org.moxieapps.gwt.highcharts.client.events
Class SeriesClickEvent

java.lang.Object
  extended by org.moxieapps.gwt.highcharts.client.events.MouseEvent
      extended by org.moxieapps.gwt.highcharts.client.events.SeriesEvent
          extended by org.moxieapps.gwt.highcharts.client.events.SeriesClickEvent

public class SeriesClickEvent
extends SeriesEvent

Provides access to the raw information provided by Highcharts when a user clicks on a series in the chart, including the nearest point to the click. This class should not be instantiated directly, but instead you should create a SeriesClickEventHandler and register it via the SeriesPlotOptions.setSeriesClickEventHandler(SeriesClickEventHandler) method in order to access click events.

Since:
1.1.0
Author:
squinn@moxiegroup.com (Shawn Quinn)

Constructor Summary
SeriesClickEvent(com.google.gwt.core.client.JavaScriptObject event, com.google.gwt.core.client.JavaScriptObject series)
          This constructor is intended for internal use only.
 
Method Summary
 Point getNearestPoint()
          Create a new GWT point instance that is connected to the Highcharts JS point instance associated with the nearest point to the click (e.g.
 String getNearestPointName()
          Return the name of the point nearest to the click (e.g.
 double getNearestXAsDouble()
          Return the x value of the nearest point as a double.
 long getNearestXAsLong()
          Return the x value of the nearest point as a long.
 String getNearestXAsString()
          Return the x value of the nearest point as a string.
 double getNearestYAsDouble()
          Return the y value of the nearest point as a double.
 long getNearestYAsLong()
          Return the y value of the nearest point as a long.
 String getNearestYAsString()
          Return the y value of the nearest point as a string.
 
Methods inherited from class org.moxieapps.gwt.highcharts.client.events.SeriesEvent
getSeriesId, getSeriesName
 
Methods inherited from class org.moxieapps.gwt.highcharts.client.events.MouseEvent
getClientX, getClientY, getNativeButton, getNativeEvent, getRelativeX, getRelativeY, getScreenX, getScreenY, isAltKeyDown, isControlKeyDown, isMetaKeyDown, isShiftKeyDown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SeriesClickEvent

public SeriesClickEvent(com.google.gwt.core.client.JavaScriptObject event,
                        com.google.gwt.core.client.JavaScriptObject series)
This constructor is intended for internal use only. You should not create click events directly, but instead should register a SeriesClickEventHandler.

Parameters:
event - The native javascript object containing the details of the original event that was fired.
series - The native javascript object that represents the series instance that the event was triggered on.
Method Detail

getNearestPoint

public Point getNearestPoint()
Create a new GWT point instance that is connected to the Highcharts JS point instance associated with the nearest point to the click (e.g. "event.point").

Returns:
A Point instance that is connected to the Highcharts data point associated with this event

getNearestPointName

public String getNearestPointName()
Return the name of the point nearest to the click (e.g. "event.point.name").

Returns:
The name of the point that was nearest to where the user clicked on the series.

getNearestXAsDouble

public double getNearestXAsDouble()
Return the x value of the nearest point as a double. An exception will be thrown if the native value of the object is not a number.

Returns:
The x value of the nearest point as a double.

getNearestXAsLong

public long getNearestXAsLong()
Return the x value of the nearest point as a long. An exception will be thrown if the native value of the object is not a number.

Returns:
The x value of the nearest point as a long.

getNearestXAsString

public String getNearestXAsString()
Return the x value of the nearest point as a string. An exception will be thrown if the native value of the object is not a string.

Returns:
The x value of the nearest point as a string.

getNearestYAsDouble

public double getNearestYAsDouble()
Return the y value of the nearest point as a double. An exception will be thrown if the native value of the object is not a number.

Returns:
The y value of the nearest point as a double.

getNearestYAsLong

public long getNearestYAsLong()
Return the y value of the nearest point as a long. An exception will be thrown if the native value of the object is not a number.

Returns:
The y value of the nearest point as a long.

getNearestYAsString

public String getNearestYAsString()
Return the y value of the nearest point as a string. An exception will be thrown if the native value of the object is not a string.

Returns:
The y value of the nearest point as a string.


Copyright © 2015. All Rights Reserved.