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 ScatterSegment scatterSegment = segment as ScatterSegment;
  scatterSegment._color = scatterSegment._seriesRenderer._seriesColor;
  scatterSegment._strokeColor = scatterSegment._series.borderColor;
  scatterSegment._strokeWidth =
      ((scatterSegment._series.markerSettings.shape ==
                      DataMarkerType.verticalLine ||
                  scatterSegment._series.markerSettings.shape ==
                      DataMarkerType.horizontalLine) &&
              scatterSegment._series.borderWidth == 0)
          ? scatterSegment._series.markerSettings.borderWidth
          : scatterSegment._series.borderWidth;
  scatterSegment.strokePaint = scatterSegment.getStrokePaint();
  scatterSegment.fillPaint = scatterSegment.getFillPaint();
}