ChartDataPoint constructor

const ChartDataPoint({
  1. required double x,
  2. required double y,
  3. String? label,
  4. bool showValue = true,
})

Creates a chart data point.

x and y are required and must be finite numbers. label is optional and can be used for axis labels or tooltips. showValue defaults to true to display the value on the chart.

Throws an AssertionError if x or y are not finite.

Implementation

const ChartDataPoint({
  required this.x,
  required this.y,
  this.label,
  this.showValue = true,
});