org.moxieapps.gwt.highcharts.client
Class ToolTipData

java.lang.Object
  extended by org.moxieapps.gwt.highcharts.client.ToolTipData

public class ToolTipData
extends Object

An object that represents the state information that will be passed to any custom ToolTipFormatter to allow for custom strings to be included within the tooltip area. See the ToolTipFormatter.format(ToolTipData) method for more details on the capabilities that custom formatters can provide.

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

Method Summary
 double getPercentage()
          Return the percentage value of the point (which represents the point's percentage of the total).
 double getPercentage(int index)
          Return the percentage value of the point at a given index (for shared tooltips), which represents the point's percentage of the total.
 Point getPoint()
          Create a new GWT point instance that is connected to the Highcharts JS point instance associated with this tooltip.
 Point getPoint(int index)
          Create a new GWT point instance that is connected to the Highcharts JS point instance at a given index (for shared tooltips) associated with this tooltip.
 String getPointName()
          Return the name of the point (e.g.
 String getPointName(int index)
          Return the name of the point (e.g.
 Point[] getPoints()
          Create a new GWT point instance for each values in the array of values provided that are connected to the Highcharts JS point instances associated with this tooltip (shared tooltips only).
 int getPointsLength()
          For shared tool tips only, returns the number of points that are available in the collection of data points that were passed to the tooltip (which should reflect the number of series in the chart.)
 String getSeriesId()
          Retrieve the unique id of the series that the point is a part of.
 String getSeriesId(int index)
          Retrieve the unique id of the series that a point at the given index (for shared tooltips) is a part of.
 String getSeriesName()
          Return the name of the series that the point is a part of.
 String getSeriesName(int index)
          Return the name of the series that the point at a given index (for shared tooltips) is a part of.
 double getTotal()
          Return the total value at this point's x value.
 double getTotal(int index)
          Return the total value at a point at a given index's x value (for shared tooltips).
 long getTotalAsLong()
          Return the total value at this point's x value as a long.
 long getTotalAsLong(int index)
          Return the total value at a point at a given index's x value as a long (for shared tooltips).
 double getXAsDouble()
          Return the x value of the point as a double.
 double getXAsDouble(int index)
          Return the x value of the point at the given index as a double.
 long getXAsLong()
          Return the x value of the point as a long.
 long getXAsLong(int index)
          Return the x value of the point at the given index as a long.
 String getXAsString()
          Return the x value of the point as a string.
 String getXAsString(int index)
          Return the x value of the point at the given index as a string.
 double getYAsDouble()
          Return the y value of the point as a double.
 double getYAsDouble(int index)
          Return the y value of the point as a double given the index of a specific point to retrieve (shared tooltips only).
 long getYAsLong()
          Return the y value of the point as a long.
 long getYAsLong(int index)
          Return the y value of the point at a given index as a long.
 String getYAsString()
          Return the y value of the point as a string.
 String getYAsString(int index)
          Return the y value of the point at a given index as a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getPercentage

public double getPercentage()
Return the percentage value of the point (which represents the point's percentage of the total). Stacked series and pies only.

Returns:
The percentage value of the point.

getPercentage

public double getPercentage(int index)
Return the percentage value of the point at a given index (for shared tooltips), which represents the point's percentage of the total. Stacked series and pies only.

Parameters:
index - The index of the point in the array to retrieve.
Returns:
The percentage value of the point at the given index.
Since:
1.1.3

getSeriesId

public String getSeriesId()
Retrieve the unique id of the series that the point is a part of. This id can then be used to obtain the Series instance itself via the BaseChart.getSeries(String) method.

Returns:
The unique id of the series that the event was triggered on.

getSeriesId

public String getSeriesId(int index)
Retrieve the unique id of the series that a point at the given index (for shared tooltips) is a part of. This id can then be used to obtain the Series instance itself via the BaseChart.getSeries(String) method.

Parameters:
index - The index of the point in the array to retrieve the series from.
Returns:
The unique id of the series that the event was triggered on for the given indexed point.
Since:
1.1.3

getSeriesName

public String getSeriesName()
Return the name of the series that the point is a part of.

Returns:
The name of the series that the point is a part of

getSeriesName

public String getSeriesName(int index)
Return the name of the series that the point at a given index (for shared tooltips) is a part of.

Parameters:
index - The index of the point in the array to retrieve the series from.
Returns:
The name of the series that the point at the given index is a part of
Since:
1.1.3

getPoint

public Point getPoint()
Create a new GWT point instance that is connected to the Highcharts JS point instance associated with this tooltip.

Returns:
A Point instance that is connected to the Highcharts data point associated with the tooltip.

getPoint

public Point getPoint(int index)
Create a new GWT point instance that is connected to the Highcharts JS point instance at a given index (for shared tooltips) associated with this tooltip.

Parameters:
index - The index of the point in the array to retrieve.
Returns:
A Point instance that is connected to the Highcharts data point associated with the tooltip.
Since:
1.1.3

getPoints

public Point[] getPoints()
Create a new GWT point instance for each values in the array of values provided that are connected to the Highcharts JS point instances associated with this tooltip (shared tooltips only). Note that if you simply need to iterate over the data points to retrieve the values for rendering the tooltip, it's more efficient to use the getPointsLength() method instead.

Returns:
A Point instance that is connected to the Highcharts data point associated with the tooltip.
Since:
1.1.3

getPointsLength

public int getPointsLength()
For shared tool tips only, returns the number of points that are available in the collection of data points that were passed to the tooltip (which should reflect the number of series in the chart.)

Returns:
The number of points available as data to the tool tip

getPointName

public String getPointName()
Return the name of the point (e.g. "point.name").

Returns:
The name of the point that the tooltip is over.

getPointName

public String getPointName(int index)
Return the name of the point (e.g. "point[i].name") at the given index (for shared tooltips).

Parameters:
index - The index of the point in the array to retrieve the name from.
Returns:
The name of the point at the given index that the tooltip is over.
Since:
1.1.3

getTotal

public double getTotal()
Return the total value at this point's x value. Stacked series only.

Returns:
The total value at this point's x value (only applicable in stacked series).

getTotal

public double getTotal(int index)
Return the total value at a point at a given index's x value (for shared tooltips). Stacked series only.

Parameters:
index - The index of the point in the array to retrieve the value from.
Returns:
The total value at the given indexed point's x value (only applicable in stacked series).
Since:
1.1.3

getTotalAsLong

public long getTotalAsLong()
Return the total value at this point's x value as a long. Stacked series only.

Returns:
Return the total value at this point's x value as a long.

getTotalAsLong

public long getTotalAsLong(int index)
Return the total value at a point at a given index's x value as a long (for shared tooltips). Stacked series only.

Parameters:
index - The index of the point in the array to retrieve the value from.
Returns:
Return the total value at the given indexed point's x value as a long.
Since:
1.1.3

getXAsDouble

public double getXAsDouble()
Return the x value of the 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 point as a double.

getXAsDouble

public double getXAsDouble(int index)
Return the x value of the point at the given index as a double. An exception will be thrown if the native value of the object is not a number. (For shared tool tips.)

Parameters:
index - The index of the point in the array to retrieve the value from.
Returns:
The x value of the point at the given index as a double.
Since:
1.1.3

getXAsLong

public long getXAsLong()
Return the x value of the 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 point as a long.

getXAsLong

public long getXAsLong(int index)
Return the x value of the point at the given index as a long. An exception will be thrown if the native value of the object is not a number. (For shared tool tips.)

Parameters:
index - The index of the point in the array to retrieve the value from.
Returns:
The x value of the point at the given index as a long.
Since:
1.1.3

getXAsString

public String getXAsString()
Return the x value of the 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 point as a string.

getXAsString

public String getXAsString(int index)
Return the x value of the point at the given index as a string. An exception will be thrown if the native value of the object is not a string. (For shared tool tips.)

Parameters:
index - The index of the point in the array to retrieve the value from.
Returns:
The x value of the point at the given index as a string.
Since:
1.1.3

getYAsDouble

public double getYAsDouble()
Return the y value of the 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 point as a double.

getYAsDouble

public double getYAsDouble(int index)
Return the y value of the point as a double given the index of a specific point to retrieve (shared tooltips only). An exception will be thrown if the native value of the object is not a number.

Parameters:
index - The index of the point in the array to retrieve.
Returns:
The y value of the point as a double.
Since:
1.1.3

getYAsLong

public long getYAsLong()
Return the y value of the 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 point as a long.

getYAsLong

public long getYAsLong(int index)
Return the y value of the point at a given index as a long. An exception will be thrown if the native value of the object is not a number. (For shared tooltips only.)

Parameters:
index - The index of the point in the array to retrieve.
Returns:
The y value of the point as a long.
Since:
1.1.3

getYAsString

public String getYAsString()
Return the y value of the 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 point as a string.

getYAsString

public String getYAsString(int index)
Return the y value of the point at a given index as a string. An exception will be thrown if the native value of the object is not a string. (For shared tooltips only.)

Parameters:
index - The index of the point in the array to retrieve.
Returns:
The y value of the point at the given index as a string.
Since:
1.1.3


Copyright © 2015. All Rights Reserved.