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, defaultObjectWriter, options -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LineDatadata()Static factory, constructs anHomogeneousDataimplementation appropriate for aLineChart.getType()booleanOptional check to determine whether the current state of thisChartimplementation instance will generate a drawable JSON string.static LineOptionsoptions()Methods inherited from class software.xdev.chartjs.model.charts.AbstractChart
getData, getDefaultObjectWriter, getOptions, self, setData, setDefaultObjectWriter, setOptions, toJsonNative
-
Constructor Details
-
LineChart
public LineChart() -
LineChart
-
LineChart
-
-
Method Details
-
data
Static factory, constructs anHomogeneousDataimplementation appropriate for aLineChart.- Returns:
- a new
LineDatainstance
-
options
- Returns:
- a new
LineOptionsinstance
-
getType
- Returns:
- type of this
Chartimplementation for proper drawing in JavaScript.
-
isDrawable
public boolean isDrawable()Optional check to determine whether the current state of this
Chartimplementation 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.
LineChartis 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
thisChartis drawable in its current state
-