Pie<T> class Pies

The pie generator computes the necessary angles to represent a tabular dataset as a pie or donut chart; these angles can then be passed to an arc generator. (The pie generator does not produce a shape directly.)

Constructors

Pie.new(num value(T, int, List<T>))
Constructs a new pie generator with the given value accessor.
Pie.withConstants(num value)
Constructs a new stack generator with the given value number.

Properties

endAngle num Function(Pie<T>, [List<Object?>?])
The overall end angle of the pie.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
padAngle num Function(Pie<T>, [List<Object?>?])
The pad angle of the pie.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sort int Function(T, T)?
The data comparator.
getter/setter pair
sortValues int Function(num, num)?
The value comparator.
getter/setter pair
startAngle num Function(Pie<T>, [List<Object?>?])
The overall start angle of the pie.
getter/setter pair
value num Function(T, int, List<T>)
When a pie is generated (see Pie.call), the value accessor will be invoked for each element in the input data list, being passed the element d, the index i, and the list data as three arguments.
getter/setter pair

Methods

call(Iterable<T> data, [List<Object?>? args]) List<PieArc>
Generates a pie for the given list of data, returning an list of maps representing each datum’s arc angles.
constEndAngle(num endAngle) → void
Defines the Pie.endAngle-accessor as a constant function that always returns the specified value.
constPadAngle(num padAngle) → void
Defines the Pie.padAngle-accessor as a constant function that always returns the specified value.
constStartAngle(num startAngle) → void
Defines the Pie.startAngle-accessor as a constant function that always returns the specified value.
constValue(num value) → void
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

Static Methods

withDefaults([num value(num, int, List<num>) = identity]) Pie<num>
Equivalent to Pie.new, except that if value is not specified, its default is used.