Class BarChart
java.lang.Object
software.xdev.chartjs.model.charts.AbstractChart<BarChart,BarOptions,BarData>
software.xdev.chartjs.model.charts.BarChart
- All Implemented Interfaces:
Chart<BarChart,
BarOptions, BarData>
-
Field Summary
Fields inherited from class software.xdev.chartjs.model.charts.AbstractChart
data, objectWriter, options
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class software.xdev.chartjs.model.charts.AbstractChart
getData, getOptions, self, setData, setOptions, toJsonNative
-
Constructor Details
-
BarChart
public BarChart() -
BarChart
-
BarChart
-
-
Method Details
-
data
- Returns:
- a new
BarData
instance
-
options
- Returns:
- a new
BarOptions
instance
-
getType
- Returns:
- type of this
Chart
implementation for proper drawing in JavaScript.
-
isDrawable
public boolean isDrawable()Optional check to determine whether the current state of this
Chart
implementation instance will generate a drawable JSON string.Implementations provide a best-effort evaluation, and can not guarantee that the serialized chart will be rendered correctly.
A
BarChart
is drawable if:- at least one dataset has at least one data point
- an xAxis scale exists with the id of the xAxisID set on a dataset, if such an id set
- a yAxis scale exists with the id of the yAxisID set on a dataset, if such an id is set
- there is at least one label in the
BarData
- Returns:
- true if this
BarChart
is drawable in its current state
-