Package org.pepstock.charba.client.items
Class InteractionItem
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.items.InteractionItem
-
public final class InteractionItem extends NativeObjectContainer
Object used by CHART.JS to manages the user interaction on chart instances, for events, hovering and tooltips.- Author:
- Andrea "Stock" Stocchero
-
-
Constructor Summary
Constructors Constructor Description InteractionItem(IsChart chart, ChartElement element, int datasetIndex, int index)
Creates an item with chart and a specific dataset element, setting dataset and data indexes.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NativeObjectContainerFactory<InteractionItem>
createFactory(IsChart chart)
Returns an interaction items factory for a specific chart.IsChart
getChart()
Returns the CHARBA chart instance.int
getDatasetIndex()
Returns the dataset index of the chartChartElement
getElement()
Returns the chart element (point, arc, bar, etc.) for this tooltip item.int
getIndex()
Returns the index of the data inside the dataset.NativeObject
nativeObject()
Returns the native object instance.-
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainer
checkAndGetColor, 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, 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, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
-
-
-
Constructor Detail
-
InteractionItem
public InteractionItem(IsChart chart, ChartElement element, int datasetIndex, int index)
Creates an item with chart and a specific dataset element, setting dataset and data indexes.- Parameters:
chart
- chart instanceelement
- element of the datasetdatasetIndex
- dataset index in the chartindex
- data index in the dataset data
-
-
Method Detail
-
getChart
public final IsChart getChart()
Returns the CHARBA chart instance.- Returns:
- the CHARBA chart instance
-
getIndex
public final int getIndex()
Returns the index of the data inside the dataset.- Returns:
- the index of the data inside the dataset.
-
getDatasetIndex
public final int getDatasetIndex()
Returns the dataset index of the chart- Returns:
- the dataset index of the chart.
-
getElement
public final ChartElement getElement()
Returns the chart element (point, arc, bar, etc.) for this tooltip item.- Returns:
- the chart element (point, arc, bar, etc.) for this tooltip item.
-
nativeObject
public NativeObject nativeObject()
Returns the native object instance.- Returns:
- the native object instance.
-
createFactory
public static NativeObjectContainerFactory<InteractionItem> createFactory(IsChart chart)
Returns an interaction items factory for a specific chart.- Parameters:
chart
- chart instance- Returns:
- an interaction items factory for a specific chart
-
-