public final class LabelsContext extends AbstractDatasetContext
LabelsPlugin.ID
plugin when the callback function is called.Modifier and Type | Method and Description |
---|---|
protected boolean |
checkIfPropertyIsValid(Key property)
Checks if the key passed as argument is a key already used for other context properties.
|
DataItem |
getDataItem()
Returns the value for the data set by a
DataItem . |
String |
getLabel()
Returns the label for the data set.
|
Label |
getLabelOptions()
Returns the label options of plugin.
|
double |
getPercentage()
Returns the percentage for the data set.
|
protected boolean |
isConsistent()
Returns
true if the context is consistent.Custom context (the plugin ones) should extend it and check if the context is consistent before invoking the callback. |
getDataIndex, getDatasetElement, getDatasetIndex, getDatasetItem, getMode, isActive
getAttribute, getAttribute, getAttribute, getAttribute, getAttributes, getChart, getType, hasAttributes, setAttribute, setAttribute, setAttribute, setAttribute, setAttributes
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
public Label getLabelOptions()
public String getLabel()
public double getPercentage()
public DataItem getDataItem()
DataItem
.DataItem
.protected boolean isConsistent()
ChartContext
true
if the context is consistent.isConsistent
in class ChartContext
true
if the context is consistentprotected boolean checkIfPropertyIsValid(Key property)
ChartContext
checkIfPropertyIsValid
in class AbstractDatasetContext
property
- property to use to store a custom attributetrue
if the property can be used to store an attribute.