drawHorizontalAxesMajorGridLines method

  1. @override
void drawHorizontalAxesMajorGridLines(
  1. Canvas canvas,
  2. Offset point,
  3. ChartAxisRenderer axisRenderer,
  4. MajorGridLines grids,
  5. int index,
  6. SfCartesianChart chart,
)

To draw the major grid lines of horizontal axes

Implementation

@override
void drawHorizontalAxesMajorGridLines(
    Canvas canvas,
    Offset point,
    ChartAxisRenderer axisRenderer,
    MajorGridLines grids,
    int index,
    SfCartesianChart chart) {
  final _CustomPaintStyle paintStyle = _CustomPaintStyle(
      axisRenderer.getAxisMajorGridWidth(axisRenderer._axis, index),
      axisRenderer.getAxisMajorGridColor(axisRenderer._axis, index) ??
          _chartState._chartTheme.majorGridLineColor,
      PaintingStyle.stroke);
  _drawDashedPath(
      canvas,
      paintStyle,
      Offset(point.dx, _chartState._chartAxis._axisClipRect.top),
      Offset(
          point.dx,
          _chartState._chartAxis._axisClipRect.top +
              _chartState._chartAxis._axisClipRect.height),
      grids.dashArray);
}