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 AreaSegment areaSegment = segment as AreaSegment;
  final SegmentProperties segmentProperties =
      SegmentHelper.getSegmentProperties(areaSegment);
  segmentProperties.color = _segmentSeriesDetails.seriesColor;
  segmentProperties.strokeColor = _segmentSeriesDetails.seriesColor;
  segmentProperties.strokeWidth = segmentProperties.series.width;
  areaSegment.strokePaint = areaSegment.getStrokePaint();
  areaSegment.fillPaint = areaSegment.getFillPaint();
}