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 BoxAndWhiskerSegment boxSegment = segment as BoxAndWhiskerSegment;
  final SegmentProperties segmentProperties =
      SegmentHelper.getSegmentProperties(boxSegment);
  segmentProperties.color =
      segmentProperties.currentPoint!.pointColorMapper ??
          _segmentSeriesDetails.seriesColor;
  segmentProperties.strokeColor = segmentProperties.series.borderColor;
  segmentProperties.strokeWidth = segmentProperties.series.borderWidth;
  boxSegment.strokePaint = boxSegment.getStrokePaint();
  boxSegment.fillPaint = boxSegment.getFillPaint();
}