paintSurface method

void paintSurface(
  1. Canvas canvas
)

Paints the surface of the chart grid onto the given canvas.

This method is responsible for rendering the visual elements of the chart grid on the provided canvas.

canvas The canvas on which to paint the chart grid.

Implementation

void paintSurface(Canvas canvas) {
  //canvas.drawPath(outerPath, gridPaint);
  for (int i = 1; i < columns; i++) {
    var start = Offset(i * (outerRect.width / columns), outerRect.top);
    var end = Offset(i * outerRect.width / columns, outerRect.height);
    canvas.drawLine(start, end, gridPaint);
  }
}