drawGridLine method

void drawGridLine(
  1. Canvas c,
  2. double x,
  3. double? y,
  4. Path path,
)

Draws the grid line at the specified position using the provided path.

@param c @param x @param y @param gridLinePath

Implementation

void drawGridLine(Canvas c, double x, double? y, Path path) {
  path.moveTo(x, viewPortHandler!.contentBottom());
  path.lineTo(x, viewPortHandler!.contentTop());

  // draw a path because lines don't support dashing on lower android versions
  if (xAxis!.gridDashPathEffect != null) {
    path = xAxis!.gridDashPathEffect!.convert2DashPath(path);
  }

  c.drawPath(path, gridPaint!);

  path.reset();
}