public final class Scales extends NativeObjectContainer implements IsDefaultScales
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_SINGLE_AXIS_ID
Default name of axis when the chart has got only 1 scale (polar, radar) is "scale".
|
static String |
DEFAULT_X_AXIS_ID
Default name of X axis is "x-axis-0".
|
static String |
DEFAULT_Y_AXIS_ID
Default name of Y axis is "y-axis-0".
|
Constructor and Description |
---|
Scales(IsDefaultScales defaultValues)
Creates a scales object by defaults values.
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkAndAddToParent()
Called recursively when a property has been set in the item.
This is mandatory because it could happen that the parent item is not present, therefore it must be added. |
protected Key |
getChildKey()
Returns the property name to use to add this element to its parent.
|
protected D |
getDefaultValues()
Returns the default provider instance.
|
Display |
getDisplay()
The display option controls the visibility of axis.
Controls the axis global visibility (visible when true, hidden when false). |
protected P |
getParent()
Returns the parent element.
|
List<Scale> |
getXAxes()
Returns a list of X axes.
|
IsDefaultScale |
getXAxis()
Returns the default configuration for x axis.
|
List<Scale> |
getYAxes()
Returns a list of Y axes.
|
IsDefaultScale |
getYAxis()
Returns the default configuration for y axis.
|
protected void |
setCallbackToModel(org.pepstock.charba.client.options.AbstractModel<?,?> model,
Key key,
CallbackProxy.Proxy proxy)
Adds a proxy function (for callbacks) to a model at the specific key.
|
void |
setDisplay(boolean display)
If
true , shows the axis. |
void |
setDisplay(Display display)
The display option controls the visibility of axis.
Controls the axis global visibility (visible when true, hidden when false). |
protected void |
setEventToModel(org.pepstock.charba.client.options.AbstractModel<?,?> model,
Key key,
CallbackProxy.Proxy proxy)
Adds a proxy function (for events) to a model at the specific key.
|
void |
setXAxes(Scale... scales)
Sets all X axes of chart.
|
void |
setYAxes(Scale... scales)
Sets all Y axes of chart.
|
checkValue, getArrayValue, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, keys, remove, remove, removeIfExists, setArrayValue, setArrayValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
public static final String DEFAULT_X_AXIS_ID
public static final String DEFAULT_Y_AXIS_ID
public static final String DEFAULT_SINGLE_AXIS_ID
public Scales(IsDefaultScales defaultValues)
defaultValues
- default values of scalespublic void setDisplay(boolean display)
true
, shows the axis.display
- if true
, shows the axes.public void setDisplay(Display display)
display
- display option controls the visibility of axispublic Display getDisplay()
getDisplay
in interface IsDefaultScales
public void setXAxes(Scale... scales)
scales
- array of axes.public void setYAxes(Scale... scales)
scales
- array of axes.public IsDefaultScale getXAxis()
IsDefaultScales
getXAxis
in interface IsDefaultScales
public IsDefaultScale getYAxis()
IsDefaultScales
getYAxis
in interface IsDefaultScales
protected final Key getChildKey()
null
if is a root element.protected final P getParent()
null
if is a root element.protected final D getDefaultValues()
protected final void setEventToModel(org.pepstock.charba.client.options.AbstractModel<?,?> model, Key key, CallbackProxy.Proxy proxy)
model
- element where adding the function proxykey
- property name to use to add the function proxyproxy
- the function proxy instance to addprotected final void setCallbackToModel(org.pepstock.charba.client.options.AbstractModel<?,?> model, Key key, CallbackProxy.Proxy proxy)
model
- element where adding the function proxykey
- property name to use to add the function proxyproxy
- the function proxy instance to addprotected final void checkAndAddToParent()