dataLabelSurfaceColor method
Color
dataLabelSurfaceColor(
- CartesianChartDataLabelPositioned label
)
override
Implementation
@override
Color dataLabelSurfaceColor(CartesianChartDataLabelPositioned label) {
final ChartDataLabelAlignment alignment = label.labelAlignment;
final ChartSegment segment = segments[label.dataPointIndex];
switch (alignment) {
case ChartDataLabelAlignment.auto:
case ChartDataLabelAlignment.outer:
case ChartDataLabelAlignment.top:
case ChartDataLabelAlignment.bottom:
return super.dataLabelSurfaceColor(label);
case ChartDataLabelAlignment.middle:
return segment.getFillPaint().color;
}
}