Package be.ceau.chart
Class DoughnutChart
java.lang.Object
be.ceau.chart.DoughnutChart
- All Implemented Interfaces:
Chart
-
Constructor Summary
ConstructorDescriptionDoughnutChart
(DoughnutData data) DoughnutChart
(DoughnutData data, DoughnutOptions options) -
Method Summary
Modifier and TypeMethodDescriptionstatic DoughnutData
data()
Static factory, constructs anData
implementation appropriate for aDoughnutChart
.getData()
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
.setData
(DoughnutData data) setOptions
(DoughnutOptions options) toJson()
Convertthis
instance to Json for use with Chart.js library.
-
Constructor Details
-
DoughnutChart
public DoughnutChart() -
DoughnutChart
-
DoughnutChart
-
-
Method Details
-
data
Static factory, constructs anData
implementation appropriate for aDoughnutChart
.- Returns:
- a new
DoughnutData
instance
-
options
Static factory, constructs anOptions
implementation appropriate for aDoughnutChart
.- Returns:
- a new
DoughnutOptions
instance
-
getData
-
setData
-
getOptions
-
setOptions
-
getType
-
toJson
Description copied from interface:Chart
Convert
this
instance to Json for use with Chart.js library. -
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.- Specified by:
isDrawable
in interfaceChart
- Returns:
- true if
this
Chart
is drawable in its current state
-