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