decorate method
void
decorate(
- ArcRendererElementList<
D> arcElements, - ChartCanvas canvas,
- GraphicsFactory graphicsFactory, {
- required Rectangle<
num> drawBounds, - required double animationPercent,
- bool rtl = false,
override
Implementation
@override
void decorate(ArcRendererElementList<D> arcElements, ChartCanvas canvas,
GraphicsFactory graphicsFactory,
{required Rectangle drawBounds,
required double animationPercent,
bool rtl = false}) {
/// TODO: Improve label handling for sunburst chart. When a
/// more sophisticated collision detection is in place, we can draw the
/// label for inner arc outside when it doesn't collide with outer arcs.
// Do not draw label for arcs on the inner ring if positioned outside.
if (innerRingArcLabelPosition == ArcLabelPosition.outside) {
arcElements.arcs
.retainWhere((e) => (e as SunburstArcRendererElement).isLeaf == true);
}
super.decorate(arcElements, canvas, graphicsFactory,
drawBounds: drawBounds, animationPercent: animationPercent, rtl: rtl);
}