DonutChartRenderer class
Draws a list of PieSlices as stroked arcs around a hollow center.
- Inheritance
-
- Object
- ChartRenderer
- DonutChartRenderer
- Implemented types
Constructors
-
DonutChartRenderer({required List<
PieSlice> slices, double labelThreshold = 5, double holeRadiusFraction = 0.5}) -
Creates a renderer for
slices, labeling bands at or abovelabelThresholdpercent, with a hollow center ofholeRadiusFractionof the outer radius.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
- holeRadiusFraction → double
-
The hole radius as a fraction of the outer radius (0 = full pie, 1 = ring).
final
- 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