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