PieLayout<T> class

A pie/donut layout generator that computes arc angles from data values.

Constructors

PieLayout({required double value(T), double startAngle = -math.pi / 2, double endAngle = 3 * math.pi / 2, double padAngle = 0, int sort(T a, T b)?, bool sortByValueDescending = false})
Creates a pie layout generator.

Properties

endAngle → double
The end angle in radians (default: 3*pi/2, full circle).
final
hashCode → int
The hash code for this object.
no setterinherited
padAngle → double
Padding angle between slices in radians.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sort → int Function(T a, T b)?
Optional sort comparator for data items.
final
sortByValueDescending → bool
Whether to sort by value descending.
final
startAngle → double
The start angle in radians (default: -pi/2, 12 o'clock position).
final
value → double Function(T)
Function to extract the value from a data item.
final

Methods

generate(List<T> data) → List<PieArc<T>>
Generates pie arcs from the given data.
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