drawHorizontalAxesLine method
void
drawHorizontalAxesLine(
- Canvas canvas,
- ChartAxisRenderer axisRenderer,
- SfCartesianChart chart
To draw the horizontal axis line
Implementation
@override
void drawHorizontalAxesLine(
Canvas canvas, ChartAxisRenderer axisRenderer, SfCartesianChart chart) {
final ChartAxis axis = axisRenderer._axis;
final Rect rect = Rect.fromLTWH(
axisRenderer._bounds.left - axis.plotOffset,
axisRenderer._bounds.top,
axisRenderer._bounds.width + 2 * axis.plotOffset,
axisRenderer._bounds.height);
final _CustomPaintStyle paintStyle = _CustomPaintStyle(
axisRenderer.getAxisLineWidth(axis),
axisRenderer.getAxisLineColor(axis) ??
_chartState._chartTheme.axisLineColor,
PaintingStyle.stroke);
_drawDashedPath(canvas, paintStyle, Offset(rect.left, rect.top),
Offset(rect.left + rect.width, rect.top), axis.axisLine.dashArray);
_xAxisStart = Offset(rect.left, rect.top);
_xAxisEnd = Offset(rect.left + rect.width, rect.top);
}