PieChartPainter constructor
PieChartPainter()
Paints dataList
into canvas, it is the animating PieChartData,
targetData
is the animation's target and remains the same
during animation, then we should use it when we need to show
tooltips or something like that, because dataList
is changing constantly.
textScale
used for scaling texts inside the chart,
parent can use MediaQuery.textScaleFactor
to respect
the system's font size.
Implementation
PieChartPainter() : super() {
_sectionPaint = Paint()..style = PaintingStyle.stroke;
_sectionStrokePaint = Paint()..style = PaintingStyle.stroke;
_centerSpacePaint = Paint()..style = PaintingStyle.fill;
}