drawDataLabelWithBackground method
void
drawDataLabelWithBackground(
- int index,
- Canvas canvas,
- String dataLabel,
- Offset offset,
- int angle,
- TextStyle style,
- Paint fillPaint,
- Paint strokePaint,
override
Implementation
@override
void drawDataLabelWithBackground(
int index,
Canvas canvas,
String dataLabel,
Offset offset,
int angle,
TextStyle style,
Paint fillPaint,
Paint strokePaint,
) {
if (dataLabelMapper == null &&
parent!.onDataLabelRender == null &&
!dataLabelSettings.showCumulativeValues) {
final num value = yValues[index];
if ((!dataLabelSettings.showZeroValue && value == 0) || value.isNaN) {
return;
}
dataLabel = formatNumericValue(value, yAxis);
}
super.drawDataLabelWithBackground(
index, canvas, dataLabel, offset, angle, style, fillPaint, strokePaint);
}