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 protectedScales(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.AxisgetAxisById(String scaleId)Returns the scale with the id passed as argument ornullif not exist.AxisgetAxisById(ScaleId scaleId)Returns the scale with the id passed as argument ornullif not exist.IsChartgetChart()Returns the chart instanceprotected ExtendedOptionsgetConfiguration()Returns the configuration element.protected ConfigurationOptionsgetOptions()Returns the configuration options.voidsetAxes(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 ornullif not exist.- Parameters:
scaleId- scale id to check- Returns:
- the scale with the id passed as argument or
nullif not exist
-
getAxisById
public Axis getAxisById(ScaleId scaleId)
Returns the scale with the id passed as argument ornullif not exist.- Parameters:
scaleId- scale id to check- Returns:
- the scale with the id passed as argument or
nullif 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
-
-