Class DoughnutChart
java.lang.Object
software.xdev.chartjs.model.charts.AbstractChart<T,O,D>
software.xdev.chartjs.model.charts.HomogeneousChart<DoughnutChart,DoughnutOptions,DoughnutData>
software.xdev.chartjs.model.charts.DoughnutChart
- All Implemented Interfaces:
Chart<DoughnutChart,
DoughnutOptions, DoughnutData>
-
Field Summary
Fields inherited from class software.xdev.chartjs.model.charts.AbstractChart
data, defaultObjectWriter, options
-
Constructor Summary
ConstructorsConstructorDescriptionDoughnutChart
(DoughnutData data) DoughnutChart
(DoughnutData data, DoughnutOptions options) -
Method Summary
Modifier and TypeMethodDescriptionstatic DoughnutData
data()
Static factory, constructs anHomogeneousData
implementation appropriate for aDoughnutChart
.getType()
boolean
Optional check to determine whether the current state of thisChart
implementation instance will generate a drawable JSON string.static DoughnutOptions
options()
Static factory, constructs anOptions
implementation appropriate for aDoughnutChart
.Methods inherited from class software.xdev.chartjs.model.charts.AbstractChart
getData, getDefaultObjectWriter, getOptions, self, setData, setDefaultObjectWriter, setOptions, toJsonNative
-
Constructor Details
-
DoughnutChart
public DoughnutChart() -
DoughnutChart
-
DoughnutChart
-
-
Method Details
-
data
Static factory, constructs anHomogeneousData
implementation appropriate for aDoughnutChart
.- Returns:
- a new
DoughnutData
instance
-
options
Static factory, constructs anOptions
implementation appropriate for aDoughnutChart
.- Returns:
- a new
DoughnutOptions
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.
DoughnutChart
is drawable if at least one dataset has at least one data point.- Returns:
- true if
this
Chart
is drawable in its current state
-