drawNoDataIcon method
Draws four filled circles of a seventh of the height of bounds, scattered over it.
Implementation
@protected
@override
void drawNoDataIcon(ui.Canvas canvas, MutableRect bounds, ChartPaint paint) {
paint.style = PaintStyle.FILL;
final r = bounds.height() / 7;
// (x, y) fractions of the bounds, pairwise.
final centers = Float32List.fromList([
0.15, 0.75, //
0.4, 0.35, //
0.62, 0.6, //
0.85, 0.2, //
]);
for (var i = 0; i < centers.length; i += 2) {
final fx = centers[i];
final fy = centers[i + 1];
canvas.drawCircleP(
bounds.left + bounds.width() * fx,
bounds.top + bounds.height() * fy,
r,
paint,
);
}
}