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

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

public class ChartClickEvent
extends MouseEvent

Provides access to the raw information provided by Highcharts when a user clicks on the plot area of the chart, including the axis values of the click. This class should not be instantiated directly, but instead you should create a ChartClickEventHandler and register it via the BaseChart.setClickEventHandler(ChartClickEventHandler) method in order to access click events.

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

Constructor Summary
ChartClickEvent(com.google.gwt.core.client.JavaScriptObject event)
          This constructor is intended for internal use only.
 
Method Summary
 double getXAxisValue()
          Return the value of the first X axis at the click event location.
 double getXAxisValue(int axisIndex)
          Return the value of the requested X axis at the click event location.
 long getXAxisValueAsLong()
          Return the value of the first X axis at the click event location, converting the value to a long value first.
 long getXAxisValueAsLong(int axisIndex)
          Return the value of the requested X axis at the click event location, converting the value to a long before returning it.
 double getYAxisValue()
          Return the value of the first Y axis at the click event location.
 double getYAxisValue(int axisIndex)
          Return the value of the requested Y axis at the click event location.
 long getYAxisValueAsLong()
          Return the value of the first Y axis at the click event location, converting the value to a long value first.
 long getYAxisValueAsLong(int axisIndex)
          Return the value of the requested Y axis at the click event location, converting the value to a long before returning it.
 
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

ChartClickEvent

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

Parameters:
event - The native javascript object containing the details of the original event that was fired.
Method Detail

getXAxisValue

public double getXAxisValue()
Return the value of the first X axis at the click event location. See the getXAxisValue(int) method if you need the value of a different X axis.

Returns:
The value of the first X axis at the click event location.

getXAxisValueAsLong

public long getXAxisValueAsLong()
Return the value of the first X axis at the click event location, converting the value to a long value first. See the getXAxisValueAsLong(int) method if you need the value of a different X axis, or the getXAxisValue() method if you need a floating point value instead.

Returns:
The value of the first X axis at the click event location, as a long.

getXAxisValue

public double getXAxisValue(int axisIndex)
Return the value of the requested X axis at the click event location. Will throw an exception if the given axis index is invalid.

Parameters:
axisIndex - The index (zero based) of the X axis for which you'd like to retrieve the value of the click event.
Returns:
The value of the requested X axis at the click event location.

getXAxisValueAsLong

public long getXAxisValueAsLong(int axisIndex)
Return the value of the requested X axis at the click event location, converting the value to a long before returning it. Will throw an exception if the given axis index is invalid. See the getXAxisValue(int) method if you need the value as a floating point number instead.

Parameters:
axisIndex - The index (zero based) of the X axis for which you'd like to retrieve the value of the click event.
Returns:
The value of the requested X axis at the click event location, as a long.

getYAxisValue

public double getYAxisValue()
Return the value of the first Y axis at the click event location. See the getYAxisValue(int) method if you need the value of a different Y axis.

Returns:
The value of the first Y axis at the click event location.

getYAxisValueAsLong

public long getYAxisValueAsLong()
Return the value of the first Y axis at the click event location, converting the value to a long value first. See the getYAxisValueAsLong(int) method if you need the value of a different Y axis, or the getYAxisValue() method if you need a floating point value instead.

Returns:
The value of the first Y axis at the click event location, as a long.

getYAxisValue

public double getYAxisValue(int axisIndex)
Return the value of the requested Y axis at the click event location. Will throw an exception if the given axis index is invalid.

Parameters:
axisIndex - The index (zero based) of the Y axis for which you'd like to retrieve the value of the click event.
Returns:
The value of the requested Y axis at the click event location.

getYAxisValueAsLong

public long getYAxisValueAsLong(int axisIndex)
Return the value of the requested Y axis at the click event location, converting the value to a long before returning it. Will throw an exception if the given axis index is invalid. See the getYAxisValue(int) method if you need the value as a floating point number instead.

Parameters:
axisIndex - The index (zero based) of the Y axis for which you'd like to retrieve the value of the click event.
Returns:
The value of the requested Y axis at the click event location, as a long.


Copyright © 2015. All Rights Reserved.