PieChartData class

Represents a single data point in a pie chart.

The PieChartData class holds information about an individual segment in a pie chart, including its label, value, and associated color.

Example Usage:

List<PieChartData> pieData = [
  PieChartData(label: "Category A", value: 40, color: Colors.blue),
  PieChartData(label: "Category B", value: 30, color: Colors.red),
  PieChartData(label: "Category C", value: 20, color: Colors.green),
];

Constructors

PieChartData({required String label, Color? labelColor, required double value, Color? valueColor, required Color color})
Creates a new instance of PieChartData.
const

Properties

color Color
The color used to represent the pie chart segment.
final
hashCode int
The hash code for this object.
no setterinherited
label String
The label associated with the pie chart segment.
final
labelColor Color?
An optional color for the label of the pie chart segment.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value double
The numeric value representing the size of the pie chart segment.
final
valueColor Color?
An optional color for the value of the pie chart segment.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited