PieChartRenderer class
Draws a list of PieSlices as solid wedges that meet at the center.
- Inheritance
-
- Object
- ChartRenderer
- PieChartRenderer
- Implemented types
Constructors
-
PieChartRenderer({required List<
PieSlice> slices, double labelThreshold = 5}) -
Creates a renderer for
slices, labeling wedges at or abovelabelThresholdpercent.const
Properties
- accessibilityLabel → String
-
A short label naming the kind of chart, e.g.
"Line chart", for semantics.no setteroverride - accessibilityValue → String
-
A value summarizing the chart's data — counts, range, a few points.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- labelThreshold → double
-
Minimum percentage a slice must reach for its
%label to be drawn.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
slices
→ List<
PieSlice> -
The wedges to draw, in order, sweeping clockwise from 12 o'clock.
final
Methods
-
buildScene(
Size size) → ChartScene -
Builds the hit-test ChartScene for
size. Implementations must derive it from the same math used in ChartRenderer.draw, so the marks line up with the pixels exactly.override -
draw(
Canvas canvas, Size size, DrafterThemeColors theme, double progress) → void -
Draws the chart.
progressis the entrance reveal in0..1(1 = fully drawn).override -
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