ChartDataSet constructor

ChartDataSet({
  1. required String label,
  2. required List<ChartDataPoint> dataPoints,
  3. required Color color,
})

Creates a chart data set.

dataPoints should not be empty. If empty, the chart may not render correctly.

Implementation

ChartDataSet({
  required this.label,
  required this.dataPoints,
  required this.color,
}) : assert(
        dataPoints.isNotEmpty,
        'ChartDataSet must have at least one data point',
      );