Class Scales
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.commons.AbstractNode
-
- org.pepstock.charba.client.options.AbstractModel<Options,IsDefaultScales>
-
- org.pepstock.charba.client.options.Scales
-
- All Implemented Interfaces:
IsDefaultScales
- Direct Known Subclasses:
ExtendedScales
public class Scales extends AbstractModel<Options,IsDefaultScales> implements IsDefaultScales
The configuration element which contains all axes definitions.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Scale>
getAxes()
Returns a list of X axes.Scale
getAxis(String scaleId)
Returns the scale with the id passed as argument ornull
if not exist.Scale
getAxis(ScaleId scaleId)
Returns the scale with the id passed as argument ornull
if not exist.IsDefaultScale
getAxis(ScaleId scaleId, AxisKind kind)
Returns the default configuration for x axis.boolean
hasAxis(String scaleId)
Returnstrue
if the scale with the id passed as argument exists.boolean
hasAxis(ScaleId scaleId)
Returnstrue
if the scale with the id passed as argument exists.-
Methods inherited from class org.pepstock.charba.client.options.AbstractModel
getDefaultValues, getParent, loadPadding, setCallbackToModel, setCallbackToModel, setEventToModel
-
Methods inherited from class org.pepstock.charba.client.commons.AbstractNode
checkAndAddToParent, getChildKey, getParentNode, getRootNode, getUpdateListener, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setUpdateListener, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent
-
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, 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
-
hasAxis
public boolean hasAxis(String scaleId)
Returnstrue
if the scale with the id passed as argument exists.- Parameters:
scaleId
- scale id to check- Returns:
true
if the scale with the id passed as argument exists
-
hasAxis
public boolean hasAxis(ScaleId scaleId)
Returnstrue
if the scale with the id passed as argument exists.- Parameters:
scaleId
- scale id to check- Returns:
true
if the scale with the id passed as argument exists
-
getAxis
public Scale getAxis(String scaleId)
Returns the scale with the id passed as argument ornull
if not exist.- Parameters:
scaleId
- scale id to check- Returns:
- the scale with the id passed as argument or
null
if not exist
-
getAxis
public Scale getAxis(ScaleId scaleId)
Returns the scale with the id passed as argument ornull
if not exist.- Parameters:
scaleId
- scale id to check- Returns:
- the scale with the id passed as argument or
null
if not exist
-
getAxis
public IsDefaultScale getAxis(ScaleId scaleId, AxisKind kind)
Description copied from interface:IsDefaultScales
Returns the default configuration for x axis.- Specified by:
getAxis
in interfaceIsDefaultScales
- Parameters:
scaleId
- the scale id to use to get the defaultkind
- axis kind to use if the scale id is not recognizable- Returns:
- the default configuration for x axis.
-
-