drawVerticalAxesMajorGridLines method
void
drawVerticalAxesMajorGridLines(
- Canvas canvas,
- Offset point,
- ChartAxisRenderer axisRenderer,
- MajorGridLines grids,
- int index,
- SfCartesianChart chart,
To draw the major grid lines of vertical axes
Implementation
@override
void drawVerticalAxesMajorGridLines(
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);
if (_chartState._chartAxis._primaryXAxisRenderer._xAxisStart !=
Offset(_chartState._chartAxis._axisClipRect.left, point.dy) &&
_chartState._chartAxis._primaryXAxisRenderer._xAxisEnd !=
Offset(
_chartState._chartAxis._axisClipRect.left +
_chartState._chartAxis._axisClipRect.width,
point.dy)) {
_drawDashedPath(
canvas,
paintStyle,
Offset(_chartState._chartAxis._axisClipRect.left, point.dy),
Offset(
_chartState._chartAxis._axisClipRect.left +
_chartState._chartAxis._axisClipRect.width,
point.dy),
grids.dashArray);
}
}