paint method
Renders the series data on the canvas, using the data generated during the update call.
Implementation
@override
void paint(ChartCanvas canvas, double animationPercent) {
// Clean up the arcs that no longer exist.
if (animationPercent == 1.0) {
final keysToRemove = <String>[];
_seriesArcMap.forEach((key, arcList) {
arcList.arcs.removeWhere((arc) => arc.animatingOut);
if (arcList.arcs.isEmpty) {
keysToRemove.add(key);
}
});
keysToRemove.forEach(_seriesArcMap.remove);
}
super.paint(canvas, animationPercent);
}