Class LineChart
java.lang.Object
software.xdev.chartjs.model.charts.AbstractChart<T,O,D>
software.xdev.chartjs.model.charts.HomogeneousChart<LineChart,LineOptions,LineData>
software.xdev.chartjs.model.charts.LineChart
- All Implemented Interfaces:
Chart<LineChart,
LineOptions, LineData>
-
Field Summary
Fields inherited from class software.xdev.chartjs.model.charts.AbstractChart
data, objectWriter, options
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LineData
data()
Static factory, constructs anHomogeneousData
implementation appropriate for aLineChart
.getType()
boolean
Optional check to determine whether the current state of thisChart
implementation instance will generate a drawable JSON string.static LineOptions
options()
Methods inherited from class software.xdev.chartjs.model.charts.AbstractChart
getData, getOptions, self, setData, setOptions, toJsonNative
-
Constructor Details
-
LineChart
public LineChart() -
LineChart
-
LineChart
-
-
Method Details
-
data
Static factory, constructs anHomogeneousData
implementation appropriate for aLineChart
.- Returns:
- a new
LineData
instance
-
options
- Returns:
- a new
LineOptions
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.
LineChart
is drawable if at least one dataset has at least one data point.
If an xAxisID is set on a dataset, an xAxis scale must exist with that id.
If an yAxisID is set on a dataset, a yAxis scale must exist with that id.- Returns:
- true if
this
Chart
is drawable in its current state
-