onPaint method
Draws segment in series bounds.
Implementation
@override
void onPaint(Canvas canvas) {
_setSegmentProperties();
final ColumnSeries<dynamic, dynamic> columnSeries =
_segmentProperties.series as ColumnSeries<dynamic, dynamic>;
if (_segmentProperties.trackerFillPaint != null &&
columnSeries.isTrackVisible) {
_drawSegmentRect(canvas, _segmentProperties.trackRect,
_segmentProperties.trackerFillPaint!);
}
if (_segmentProperties.trackerStrokePaint != null &&
columnSeries.isTrackVisible) {
_drawSegmentRect(canvas, _segmentProperties.trackRect,
_segmentProperties.trackerStrokePaint!);
}
if (fillPaint != null) {
_drawSegmentRect(canvas, segmentRect, fillPaint!);
}
if (strokePaint != null) {
final SeriesRendererDetails seriesRendererDetails =
SeriesHelper.getSeriesRendererDetails(
_segmentProperties.seriesRenderer);
(seriesRendererDetails.dashArray![0] != 0 &&
seriesRendererDetails.dashArray![1] != 0)
? drawDashedLine(canvas, seriesRendererDetails.dashArray!,
strokePaint!, _segmentProperties.path)
: _drawSegmentRect(canvas, segmentRect, strokePaint!);
}
}