Class Labels
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.datalabels.Labels
-
public final class Labels extends NativeObjectContainer
Base object to map multi labels options forDataLabelsPlugin.IDplugin configuration.
It's possible to define multiple labels for each data element using the this object.
It is an object where each property represents a new label, the key being the label key and the value being the options specific to each label.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LabelItemcreateLabel(String id)Returns new options for specific id.LabelItemcreateLabel(DataLabelId id)Returns new options for specific id.LabelItemgetLabel(String id)Returns the stored options for specific id.LabelItemgetLabel(DataLabelId id)Returns the stored options for specific id.List<Key>getLabelKeys()Returns the list of all keys related to stored options.booleanhasLabel(String id)Returnstrueif there is a stored options for specific id.booleanhasLabel(DataLabelId id)Returnstrueif there is a stored options for specific key.voidremoveLabel(String id)Removes an existing label for specific id.voidremoveLabel(DataLabelId id)Removes an existing label for specific id.-
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
-
-
-
-
Method Detail
-
createLabel
public LabelItem createLabel(String id)
Returns new options for specific id.- Parameters:
id- id of the options- Returns:
- the new option for that id
-
createLabel
public LabelItem createLabel(DataLabelId id)
Returns new options for specific id.- Parameters:
id- id of the options- Returns:
- the new option for that id
-
getLabel
public LabelItem getLabel(String id)
Returns the stored options for specific id.- Parameters:
id- id of the options- Returns:
- the stored option or
nullif no options are stored for that id
-
getLabel
public LabelItem getLabel(DataLabelId id)
Returns the stored options for specific id.- Parameters:
id- id of the options- Returns:
- the stored option or
nullif no options are stored for that id
-
hasLabel
public boolean hasLabel(String id)
Returnstrueif there is a stored options for specific id.- Parameters:
id- id of the options- Returns:
trueif there is a stored options for specific id
-
hasLabel
public boolean hasLabel(DataLabelId id)
Returnstrueif there is a stored options for specific key.- Parameters:
id- key of the options- Returns:
trueif there is a stored options for specific key
-
removeLabel
public void removeLabel(String id)
Removes an existing label for specific id.- Parameters:
id- id of the options
-
removeLabel
public void removeLabel(DataLabelId id)
Removes an existing label for specific id.- Parameters:
id- key of the options
-
-