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