Package org.pepstock.charba.client.items
Class TooltipItem
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.items.TooltipItem
-
public class TooltipItem extends NativeObjectContainer
Contains all info for every item of tooltip.
Created and passed by CHART.JS.
It uses in the tooltips callbacks.- Author:
- Andrea "Stock" Stocchero
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TooltipItem.TooltipItemFactory
Inner class to create tooltip item by a native object.
-
Field Summary
Fields Modifier and Type Field Description static TooltipItem.TooltipItemFactory
FACTORY
Public factory to create a tooltip item from a native object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IsChart
getChart()
Returns the CHARBA chart instance.int
getDataIndex()
Returns the index of the data inside the dataset.DatasetPoint
getDataPoint()
Returns the parsed data values for the givengetDatasetIndex()
andgetDataIndex()
.int
getDatasetIndex()
Returns the dataset index of the chartDatasetElement
getElement()
Returns the dataset element (point, arc, bar, etc.) for this tooltip item.String
getFormattedValue()
Returns the formatted value for the tooltip.String
getLabel()
Returns the label for the tooltip.-
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainer
checkDefaultValuesArgument, empty, getArrayValue, getElement, getIncrementalId, getNativeChart, getNativeEvent, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, isType, keys, loadNativeObject, remove, remove, setArrayValue, setArrayValue, setArrayValue, setElement, setEmptyValue, setNewIncrementalId, setNewIncrementalId, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
-
-
-
Field Detail
-
FACTORY
public static final TooltipItem.TooltipItemFactory FACTORY
Public factory to create a tooltip item from a native object.
-
-
Method Detail
-
getChart
public final IsChart getChart()
Returns the CHARBA chart instance.- Returns:
- the CHARBA chart instance
-
getLabel
public final String getLabel()
Returns the label for the tooltip.- Returns:
- the label for the tooltip.
-
getDataPoint
public final DatasetPoint getDataPoint()
Returns the parsed data values for the givengetDatasetIndex()
andgetDataIndex()
.- Returns:
- the parsed data values for the given
getDatasetIndex()
andgetDataIndex()
-
getFormattedValue
public final String getFormattedValue()
Returns the formatted value for the tooltip.- Returns:
- the formatted value for the tooltip.
-
getDatasetIndex
public final int getDatasetIndex()
Returns the dataset index of the chart- Returns:
- the dataset index of the chart.
-
getDataIndex
public final int getDataIndex()
Returns the index of the data inside the dataset.- Returns:
- the index of the data inside the dataset.
-
getElement
public final DatasetElement getElement()
Returns the dataset element (point, arc, bar, etc.) for this tooltip item.- Returns:
- the dataset element (point, arc, bar, etc.) for this tooltip item.
-
-