Package org.pepstock.charba.client.items
Class ActiveDatasetElement
- java.lang.Object
- 
- org.pepstock.charba.client.commons.NativeObjectContainer
- 
- org.pepstock.charba.client.items.ActiveDatasetElement
 
 
- 
 public final class ActiveDatasetElement 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.
 This object has been created and passed to event handler or callbacks to apply own logic.- Author:
- Andrea "Stock" Stocchero
 
- 
- 
Field SummaryFields Modifier and Type Field Description static org.pepstock.charba.client.items.ActiveDatasetElement.ActiveDatasetElementFactoryFACTORYFactory instance to create active data set elements.
 - 
Constructor SummaryConstructors Constructor Description ActiveDatasetElement()Creates an empty data set element.ActiveDatasetElement(int datasetIndex, int dataIndex)Creates a data set element, setting data set and data element indexes.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetDatasetIndex()Returns the index of the data set.intgetIndex()Returns the index of the data element.voidsetDatasetIndex(int datasetIndex)Sets the index of the data set.voidsetIndex(int dataIndex)Sets the index of the data element.- 
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainercheckAndGetColor, 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- 
ActiveDatasetElementpublic ActiveDatasetElement(int datasetIndex, int dataIndex)Creates a data set element, setting data set and data element indexes.- Parameters:
- datasetIndex- the index of the data set.
- dataIndex- the index of the data element
 
 - 
ActiveDatasetElementpublic ActiveDatasetElement() Creates an empty data set element.
 
- 
 - 
Method Detail- 
setDatasetIndexpublic void setDatasetIndex(int datasetIndex) Sets the index of the data set.- Parameters:
- datasetIndex- the index of the data set.
 
 - 
getDatasetIndexpublic int getDatasetIndex() Returns the index of the data set.- Returns:
- the index of the data set.
 
 - 
setIndexpublic void setIndex(int dataIndex) Sets the index of the data element.- Parameters:
- dataIndex- the index of the data element
 
 - 
getIndexpublic int getIndex() Returns the index of the data element.- Returns:
- the index of the data element
 
 
- 
 
-