zoomOut method
void
zoomOut()
Decreases the magnification of the plot area.
Implementation
void zoomOut() {
_chartState!._canSetRangeController = true;
final SfCartesianChartState chartState = _chartState!;
final SfCartesianChart chart = chartState._chart;
final ZoomPanBehaviorRenderer zoomPanBehaviorRenderer =
chartState._zoomPanBehaviorRenderer;
zoomPanBehaviorRenderer._isZoomOut = true;
zoomPanBehaviorRenderer._isZoomIn = false;
final double? zoomFactor = zoomPanBehaviorRenderer._zoomFactor;
ChartAxisRenderer axisRenderer;
for (int index = 0;
index < chartState._chartAxis._axisRenderersCollection.length;
index++) {
axisRenderer = chartState._chartAxis._axisRenderersCollection[index];
if (axisRenderer._zoomFactor < 1.0 && axisRenderer._zoomFactor > 0.0) {
zoomPanBehaviorRenderer._setZoomFactorAndZoomPosition(
chartState, axisRenderer, zoomFactor);
axisRenderer._zoomFactor = axisRenderer._zoomFactor > 1.0
? 1.0
: (axisRenderer._zoomFactor < 0.0 ? 0.0 : axisRenderer._zoomFactor);
}
if (chart.onZooming != null) {
ZoomPanArgs? zoomingArgs;
_bindZoomEvent(chart, axisRenderer, zoomingArgs, chart.onZooming!);
}
}
zoomPanBehaviorRenderer._createZoomState();
}