Package org.pepstock.charba.client.items
Class DatasetItem
- java.lang.Object
- 
- org.pepstock.charba.client.commons.NativeObjectContainer
- 
- org.pepstock.charba.client.items.DatasetItem
 
 
- 
 public final class DatasetItem extends NativeObjectContainer Calling some methods on your chart instance passing an argument of an event, will return the elements at the event position.
 Created and passed by CHART.JS and provide dataset information.- Author:
- Andrea "Stock" Stocchero
 
- 
- 
Constructor SummaryConstructors Constructor Description DatasetItem(ChartEnvelop<NativeObject> envelop)Creates the item using an envelop with the native java script object which contains all properties.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description DatasetItemControllergetController()Returns the dataset controller.List<DatasetElement>getElements()Returns a list of dataset elements.intgetIndex()Returns the dataset index.IndexAxisgetIndexAxis()Returns the dataset index axis.ScaleIdgetIndexAxisID()Returns the index axis ID.ScaleItemgetIndexScale()Returns the index scale item ornullif not exists.
 IfIndexAxis=IndexAxis.Ythen iScale === yScale and vScale === xScale.
 For radar, iScale === vScale === rScale.StringgetLabel()Returns the dataset label.intgetOrder()Returns the dataset order.ScaleIdgetRAxisID()Returns the R axis ID.ScaleItemgetRScale()Returns the R scale item ornullif not exists.doublegetTotal()Returns the dataset total value of data.TypegetType()Returns the type of dataset.ScaleIdgetValueAxisID()Returns the value axis ID.ScaleItemgetValueScale()Returns the value scale item ornullif not exists.
 IfIndexAxis=IndexAxis.Ythen iScale === yScale and vScale === xScale.
 For radar, iScale === vScale === rScale.ScaleIdgetXAxisID()Returns the X axis ID.ScaleItemgetXScale()Returns the X scale item ornullif not exists.ScaleIdgetYAxisID()Returns the Y axis ID.ScaleItemgetYScale()Returns the Y scale item ornullif not exists.booleanisHidden()Returns if the dataset is hidden.booleanisVisible()Returns if the dataset is visible.- 
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainercheckDefaultValuesArgument, 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
 
- 
 
- 
- 
- 
Constructor Detail- 
DatasetItempublic DatasetItem(ChartEnvelop<NativeObject> envelop) Creates the item using an envelop with the native java script object which contains all properties.- Parameters:
- envelop- envelop with the native java script object which contains all properties.
 
 
- 
 - 
Method Detail- 
getControllerpublic DatasetItemController getController() Returns the dataset controller.- Returns:
- the dataset controller
 
 - 
getTypepublic Type getType() Returns the type of dataset.- Returns:
- the type of dataset. If not set or invalid, the default is ChartType.BAR.
 
 - 
isVisiblepublic boolean isVisible() Returns if the dataset is visible.- Returns:
- trueif the dataset is visible, otherwise is- Undefined.BOOLEAN.
 
 - 
isHiddenpublic boolean isHidden() Returns if the dataset is hidden.- Returns:
- trueif the dataset is hidden, otherwise is- Undefined.BOOLEAN.
 
 - 
getIndexpublic int getIndex() Returns the dataset index.- Returns:
- the dataset index.
 
 - 
getIndexAxispublic IndexAxis getIndexAxis() Returns the dataset index axis.- Returns:
- the dataset index axis or nullif not found.
 
 - 
getOrderpublic int getOrder() Returns the dataset order.- Returns:
- the dataset order.
 
 - 
getLabelpublic String getLabel() Returns the dataset label.- Returns:
- the dataset label.
 
 - 
getYAxisIDpublic ScaleId getYAxisID() Returns the Y axis ID.- Returns:
- the Y axis ID.
 
 - 
getYScalepublic ScaleItem getYScale() Returns the Y scale item ornullif not exists.- Returns:
- the Y scale item or nullif not exists
 
 - 
getXAxisIDpublic ScaleId getXAxisID() Returns the X axis ID.- Returns:
- the X axis ID.
 
 - 
getXScalepublic ScaleItem getXScale() Returns the X scale item ornullif not exists.- Returns:
- the X scale item or nullif not exists
 
 - 
getRAxisIDpublic ScaleId getRAxisID() Returns the R axis ID.- Returns:
- the R axis ID.
 
 - 
getRScalepublic ScaleItem getRScale() Returns the R scale item ornullif not exists.- Returns:
- the R scale item or nullif not exists
 
 - 
getValueAxisIDpublic ScaleId getValueAxisID() Returns the value axis ID.- Returns:
- the value axis ID.
 
 - 
getValueScalepublic ScaleItem getValueScale() Returns the value scale item ornullif not exists.
 IfIndexAxis=IndexAxis.Ythen iScale === yScale and vScale === xScale.
 For radar, iScale === vScale === rScale.- Returns:
- the value scale item or nullif not exists
 
 - 
getIndexAxisIDpublic ScaleId getIndexAxisID() Returns the index axis ID.- Returns:
- the index axis ID.
 
 - 
getIndexScalepublic ScaleItem getIndexScale() Returns the index scale item ornullif not exists.
 IfIndexAxis=IndexAxis.Ythen iScale === yScale and vScale === xScale.
 For radar, iScale === vScale === rScale.- Returns:
- the index scale item or nullif not exists
 
 - 
getTotalpublic double getTotal() Returns the dataset total value of data.- Returns:
- the dataset total value of data.
 
 - 
getElementspublic List<DatasetElement> getElements() Returns a list of dataset elements.- Returns:
- a list of dataset elements.
 
 
- 
 
-