customizeSegment method Null safety

  1. @override
void customizeSegment(
  1. ChartSegment segment
)
override

Changes the series color, border color, and border width.

Implementation

@override
void customizeSegment(ChartSegment segment) {
  final ColumnSegment columnSegment = segment as ColumnSegment;
  columnSegment._color = columnSegment._currentPoint!.pointColorMapper ??
      segment._seriesRenderer._seriesColor;
  columnSegment._strokeColor = segment._series.borderColor;
  columnSegment._strokeWidth = segment._series.borderWidth;
  columnSegment.strokePaint = columnSegment.getStrokePaint();
  columnSegment.fillPaint = columnSegment.getFillPaint();
  columnSegment._trackerFillPaint = columnSegment._getTrackerFillPaint();
  columnSegment._trackerStrokePaint = columnSegment._getTrackerStrokePaint();
}