customizeSegment method

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

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

Implementation

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