public class Scale extends NativeObjectContainer implements IsDefaultScale
Modifier | Constructor and Description |
---|---|
|
Scale(IsDefaultScale defaultValues)
Creates the object only with default provider.
|
protected |
Scale(IsDefaultScale defaultValues,
NativeObject nativeObject)
Creates the object only with default provider and native object.
|
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. |
AngleLines |
getAngleLines()
Returns the angle lines element.
|
ScaleBounds |
getBounds()
Returns the property controls the scale boundary strategy (bypassed by min/max time options).
|
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). |
ScaleDistribution |
getDistribution()
Returns the property controls the data distribution along the scale.
|
GridLines |
getGrideLines()
Returns the grid lines element.
|
String |
getId()
The ID is used to link datasets and scale axes together.
This is especially needed if multi-axes charts are used. |
protected P |
getParent()
Returns the parent element.
|
PointLabels |
getPointLabels()
Returns the point labels element.
|
Position |
getPosition()
Position of the axis in the chart.
|
ScaleLabel |
getScaleLabel()
Returns the scale label element.
|
Ticks |
getTicks()
Returns the ticks element.
|
Time |
getTime()
Returns the time element.
|
AxisType |
getType()
Returns the type of axis.
|
double |
getWeight()
The weight used to sort the axis.
|
boolean |
isOffset()
If
true , extra space is added to the both edges and the axis is scaled to fit into the chart area. |
boolean |
isStacked()
Returns if the axis are stacked or not.
|
void |
setBounds(ScaleBounds bounds)
Sets the property controls the scale boundary strategy (bypassed by min/max time options).
|
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). |
void |
setDistribution(ScaleDistribution distribution)
Sets property controls the data distribution along the scale.
|
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 |
setId(String id)
The ID is used to link datasets and scale axes together.
This is especially needed if multi-axes charts are used. |
void |
setOffset(boolean offset)
If
true , extra space is added to the both edges and the axis is scaled to fit into the chart area. |
void |
setPosition(Position position)
Position of the axis in the chart.
|
void |
setStacked(boolean stacked)
Sets if the axis are stacked or not.
|
void |
setType(AxisType type)
Type of scale being employed.
|
void |
setWeight(double weight)
The weight used to sort the axis.
|
checkValue, empty, getArrayValue, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, 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 Scale(IsDefaultScale defaultValues)
defaultValues
- default provider instance.protected Scale(IsDefaultScale defaultValues, NativeObject nativeObject)
defaultValues
- default provider instance.nativeObject
- native object to store properties.public final ScaleLabel getScaleLabel()
getScaleLabel
in interface IsDefaultScale
public final Ticks getTicks()
getTicks
in interface IsDefaultScale
public final GridLines getGrideLines()
getGrideLines
in interface IsDefaultScale
public final AngleLines getAngleLines()
getAngleLines
in interface IsDefaultScale
public final PointLabels getPointLabels()
getPointLabels
in interface IsDefaultScale
public final Time getTime()
getTime
in interface IsDefaultScale
public final void setId(String id)
id
- The ID is used to link datasets and scale axes togetherpublic final String getId()
UndefinedValues.STRING
if not setpublic final void setStacked(boolean stacked)
stacked
- if the axis are stacked or not.public final boolean isStacked()
isStacked
in interface IsDefaultScale
public final void setType(AxisType type)
type
- type of axispublic final AxisType getType()
getType
in interface IsDefaultScale
public final void setWeight(double weight)
weight
- weight of axispublic final double getWeight()
getWeight
in interface IsDefaultScale
public final void setDisplay(boolean display)
true
, shows the axis.display
- if true
, shows the axes.public final void setDisplay(Display display)
display
- display option controls the visibility of axispublic final Display getDisplay()
getDisplay
in interface IsDefaultScale
public final void setOffset(boolean offset)
true
, extra space is added to the both edges and the axis is scaled to fit into the chart area.offset
- extra space of axispublic final boolean isOffset()
true
, extra space is added to the both edges and the axis is scaled to fit into the chart area.isOffset
in interface IsDefaultScale
public final void setPosition(Position position)
position
- position of axispublic final Position getPosition()
getPosition
in interface IsDefaultScale
public final void setDistribution(ScaleDistribution distribution)
distribution
- property controls the data distribution along the scale.public final ScaleDistribution getDistribution()
getDistribution
in interface IsDefaultScale
public final void setBounds(ScaleBounds bounds)
bounds
- property controls the scale boundary strategy (bypassed by min/max time options).public final ScaleBounds getBounds()
getBounds
in interface IsDefaultScale
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()