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 BarSegment barSegment = segment as BarSegment;
  final SegmentProperties segmentProperties =
      SegmentHelper.getSegmentProperties(barSegment);
  segmentProperties.color = _segmentSeriesDetails.seriesColor;
  segmentProperties.strokeColor = segmentProperties.series.borderColor;
  segmentProperties.strokeWidth = segmentProperties.series.borderWidth;
  barSegment.strokePaint = barSegment.getStrokePaint();
  barSegment.fillPaint = barSegment.getFillPaint();
  segmentProperties.trackerFillPaint =
      segmentProperties.getTrackerFillPaint();
  segmentProperties.trackerStrokePaint =
      segmentProperties.getTrackerStrokePaint();
}