onPaint method
Implementation
@override
void onPaint(PaintingContext context, Offset offset) {
paintSegments(context, offset);
if (showNormalDistributionCurve) {
context.canvas.save();
final Rect clip = clipRect(paintBounds, segmentAnimationFactor,
isInversed: xAxis!.isInversed, isTransposed: isTransposed);
context.canvas.clipRect(clip);
final Paint strokePaint = Paint()
..color = curveColor
..strokeWidth = curveWidth
..style = PaintingStyle.stroke;
curveDashArray == null
? context.canvas.drawPath(_distributionPath, strokePaint)
: drawDashes(context.canvas, curveDashArray, strokePaint,
path: _distributionPath);
}
context.canvas.restore();
paintMarkers(context, offset);
paintDataLabels(context, offset);
paintTrendline(context, offset);
}