onPaint method

  1. @override
void onPaint(
  1. Canvas canvas
)
override

Draws segment in series bounds.

Implementation

@override
void onPaint(Canvas canvas) {
  Paint paint = getTrackerFillPaint();
  if (paint.color != Colors.transparent) {
    canvas.drawPath(trackPath, paint);
  }

  paint = getTrackerStrokePaint();
  if (paint.color != Colors.transparent && paint.strokeWidth > 0) {
    canvas.drawPath(trackPath, paint);
  }

  paint = getFillPaint();
  if (paint.color != Colors.transparent && innerRadius != outerRadius) {
    canvas.drawPath(yValuePath, paint);
  }

  paint = getStrokePaint();
  if (paint.color != Colors.transparent && paint.strokeWidth > 0) {
    canvas.drawPath(yValuePath, paint);
  }

  if (_shadowPaint != null && _overFilledPaint != null) {
    canvas.drawPath(shadowPath, _shadowPaint!);
    _overFilledPaint!.color = getFillPaint().color;
    canvas.drawPath(overFilledPath, _overFilledPaint!);
  }
}