Class Scales
- java.lang.Object
-
- org.pepstock.charba.client.configuration.Scales
-
- Direct Known Subclasses:
StackedScales
,TimeSeriesScales
public class Scales extends Object
The configuration element which contains all axes definitions.- Author:
- Andrea "Stock" Stocchero
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Scales(ScalesOptions options)
Builds the object storing the root options element.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Axis>
getAxes()
Returns the list of X axes.Axis
getAxisById(String scaleId)
Returns the scale with the id passed as argument ornull
if not exist.Axis
getAxisById(ScaleId scaleId)
Returns the scale with the id passed as argument ornull
if not exist.IsChart
getChart()
Returns the chart instanceprotected ExtendedOptions
getConfiguration()
Returns the configuration element.protected ConfigurationOptions
getOptions()
Returns the configuration options.void
setAxes(Axis... axes)
Sets an array of X axes.
-
-
-
Constructor Detail
-
Scales
protected Scales(ScalesOptions options)
Builds the object storing the root options element.- Parameters:
options
- root options element.
-
-
Method Detail
-
setAxes
public void setAxes(Axis... axes)
Sets an array of X axes.- Parameters:
axes
- an array of axes.
-
getAxisById
public Axis getAxisById(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
-
getAxisById
public Axis getAxisById(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
-
getAxes
public List<Axis> getAxes()
Returns the list of X axes.- Returns:
- the xAxes by a unmodifiable list
-
getOptions
protected final ConfigurationOptions getOptions()
Returns the configuration options.- Returns:
- the configuration options.
-
getConfiguration
protected final ExtendedOptions getConfiguration()
Returns the configuration element.- Returns:
- the configuration element.
-
getChart
public final IsChart getChart()
Returns the chart instance- Returns:
- the chart
-
-