PieData class

Represents a segment in a pie or donut chart.

Each segment has a label, a numeric value, and a color for visualization.

Example:

PieData(
  label: 'Mobile',
  value: 45.0,
  color: Colors.blue,
)

Constructors

PieData({required String label, required double value, required Color color})
Creates a pie chart segment.
const

Properties

color Color
The color used to render this segment.
final
hashCode int
The hash code for this object.
no setteroverride
label String
The label displayed in the legend and tooltips.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value double
The numeric value of this 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.
override

Operators

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