onPaint method

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

Draws segment in series bounds.

Implementation

@override
void onPaint(Canvas canvas) {
  final BarSeries<dynamic, dynamic> barSeries =
      _series as BarSeries<dynamic, dynamic>;
  if (_trackerFillPaint != null && barSeries.isTrackVisible) {
    _drawSegmentRect(canvas, _trackBarRect, _trackerFillPaint!);
  }

  if (_trackerStrokePaint != null && barSeries.isTrackVisible) {
    _drawSegmentRect(canvas, _trackBarRect, _trackerStrokePaint!);
  }

  if (fillPaint != null) {
    _drawSegmentRect(canvas, segmentRect, fillPaint!);
  }
  if (strokePaint != null) {
    if (_series.dashArray[0] != 0 && _series.dashArray[1] != 0) {
      _drawDashedLine(canvas, _series.dashArray, strokePaint!, _path);
    } else {
      _drawSegmentRect(canvas, segmentRect, strokePaint!);
    }
  }
}