onPaint method

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

Draws segment in series bounds.

Implementation

@override
void onPaint(Canvas canvas) {
  final ColumnSeries<dynamic, dynamic> columnSeries =
      _series as ColumnSeries<dynamic, dynamic>;

  if (_trackerFillPaint != null && columnSeries.isTrackVisible) {
    _drawSegmentRect(canvas, _trackRect, _trackerFillPaint!);
  }

  if (_trackerStrokePaint != null && columnSeries.isTrackVisible) {
    _drawSegmentRect(canvas, _trackRect, _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!);
    }
  }
}