ChartValue constructor

const ChartValue({
  1. required String name,
  2. required double value,
  3. required double percentage,
  4. required Color color,
})

Holds the data for a single value represented in a Chart.

Implementation

const factory ChartValue({
  /// The name of the value.
  required String name,

  /// The value itself.
  required double value,

  /// The percentage of the value compared to the total.
  required double percentage,

  /// The color of the value.
  required Color color,
}) = _ChartValue;