paint method

  1. @override
void paint(
  1. Context context
)
override

Draw itself and its children, according to the calculated box.offset

Implementation

@override
void paint(Context context) {
  super.paint(context);

  final datasets = Chart.of(context).datasets;

  clip(context, box!.size);
  for (final dataSet in datasets) {
    dataSet.paintBackground(context);
  }
  context.canvas.restoreContext();
  paintBackground(context);
  clip(context, box!.size);
  for (final dataSet in datasets) {
    dataSet.paint(context);
  }
  context.canvas.restoreContext();
}