drawNoDataIcon method

  1. @protected
  2. @override
void drawNoDataIcon(
  1. Canvas canvas,
  2. MutableRect bounds,
  3. ChartPaint paint
)
override

Draws a ring, the outline of a pie, inside bounds for the empty state.

Implementation

@protected
@override
void drawNoDataIcon(ui.Canvas canvas, MutableRect bounds, ChartPaint paint) {
  paint.style = PaintStyle.STROKE;
  paint.strokeWidth = bounds.height() / 5;
  final radius = (bounds.height() - paint.strokeWidth) / 2;
  canvas.drawCircleP(bounds.centerX(), bounds.centerY(), radius, paint);
}