PieChartData constructor

const PieChartData({
  1. required String label,
  2. Color? labelColor,
  3. required double value,
  4. Color? valueColor,
  5. required Color color,
})

Creates a new instance of PieChartData.

  • label: The name or category of the pie chart segment.
  • value: The numerical value representing the size of the segment.
  • color: The color used for the segment in the chart.

Implementation

const PieChartData({
  required this.label,
  this.labelColor,
  required this.value,
  this.valueColor,
  required this.color,
});