customizeSegment method

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

Changes the series color.

Implementation

@override
void customizeSegment(ChartSegment segment) {
  final ErrorBarSegment errorBarSegment = segment as ErrorBarSegment;
  final SegmentProperties segmentProperties =
      SegmentHelper.getSegmentProperties(errorBarSegment);
  segmentProperties.color =
      segmentProperties.currentPoint!.pointColorMapper ??
          _segmentSeriesDetails.seriesColor;
  errorBarSegment.strokePaint = errorBarSegment.getStrokePaint();
}