onPaint method

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

Draws segment in series bounds.

Implementation

@override
void onPaint(Canvas canvas) {
  final SegmentProperties segmentProperties =
      SegmentHelper.getSegmentProperties(this);
  _stackedBarSeries =
      segmentProperties.series as StackedBarSeries<dynamic, dynamic>;
  if (segmentProperties.trackerFillPaint != null &&
      _stackedBarSeries.isTrackVisible) {
    canvas.drawRRect(
        segmentProperties.trackRect, segmentProperties.trackerFillPaint!);
  }

  if (segmentProperties.trackerStrokePaint != null &&
      _stackedBarSeries.isTrackVisible) {
    canvas.drawRRect(
        segmentProperties.trackRect, segmentProperties.trackerStrokePaint!);
  }

  renderStackingRectSeries(
      fillPaint,
      strokePaint,
      segmentProperties.path,
      animationFactor,
      segmentProperties.seriesRenderer,
      canvas,
      segmentRect,
      segmentProperties.currentPoint!,
      currentSegmentIndex!);
}