draw abstract method

void draw(
  1. Canvas canvas,
  2. Size size,
  3. Paint paint
)

Draw ChartItem on the canvas. Canvas with item size is passed, item's padding and margin need to be calculated This is to allow more flexibility for more custom items if needed

Use paint for drawing item to canvas, this allows us to change colors of the item from _ChartPainter

Implementation

void draw(Canvas canvas, Size size, Paint paint);