customizeSegment method
To customize each segments.
Implementation
@override
void customizeSegment(ChartSegment segment) {
if (segment is RadialBarSegment<T, D>) {
updateSegmentColor(segment, borderColor, borderWidth);
if (trackColor != Colors.transparent) {
if (useSeriesColor) {
segment.trackFillPaint.color =
segment.fillPaint.color.withOpacity(trackOpacity);
} else {
segment.trackFillPaint.color = trackColor.withOpacity(trackOpacity);
}
} else {
if (useSeriesColor) {
segment.trackFillPaint.color = segment.fillPaint.color;
} else {
segment.trackFillPaint.color = trackColor;
}
}
segment.trackStrokePaint
..color = trackBorderColor
..strokeWidth = trackBorderWidth;
updateSegmentGradient(segment);
}
}