Package org.pepstock.charba.client.items
Class DatasetReference
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.items.DatasetReference
-
public final class DatasetReference extends NativeObjectContainer
Calling some methods on your chart instance passing an argument of an event, will return the elements at the event position.
The elements are mapped by this object.
This is the CHART.JS item with all needed info about a selected data set, providing the right indexes to get the data set.- Author:
- Andrea "Stock" Stocchero
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DatasetReference.DatasetReferenceItemFactory
Inner class to create data set reference item by a native object.
-
Field Summary
Fields Modifier and Type Field Description static DatasetReference.DatasetReferenceItemFactory
FACTORY
Public factory to create a data set item from a native object.
-
Constructor Summary
Constructors Constructor Description DatasetReference(AbstractDatasetContext context, DatasetElement item)
Creates the item reference using a a scriptale context and a data set item.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getDatasetIndex()
Returns the data set item index.DatasetElement
getElement()
Returns the data set item element.int
getIndex()
Returns the data set item data index.-
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, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
-
-
-
Field Detail
-
FACTORY
public static final DatasetReference.DatasetReferenceItemFactory FACTORY
Public factory to create a data set item from a native object.
-
-
Constructor Detail
-
DatasetReference
public DatasetReference(AbstractDatasetContext context, DatasetElement item)
Creates the item reference using a a scriptale context and a data set item.- Parameters:
context
- scriptable context instanceitem
- data set item to add to the object
-
-
Method Detail
-
getElement
public final DatasetElement getElement()
Returns the data set item element.- Returns:
- the data set element
-
getDatasetIndex
public final int getDatasetIndex()
Returns the data set item index.- Returns:
- the data set item index.
-
getIndex
public final int getIndex()
Returns the data set item data index.- Returns:
- the data set item data index.
-
-