zoomByFactor method
Changes the zoom level using zoom factor.
Here, you can pass the zoom factor of an axis to magnify the plot area. The value ranges from 0 to 1.
Implementation
void zoomByFactor(double zoomFactor) {
_chartState!._canSetRangeController = true;
final SfCartesianChartState chartState = _chartState!;
final SfCartesianChart chart = chartState._chart;
final ZoomPanBehaviorRenderer zoomPanBehaviorRenderer =
chartState._zoomPanBehaviorRenderer;
ChartAxisRenderer axisRenderer;
for (int index = 0;
index < chartState._chartAxis._axisRenderersCollection.length;
index++) {
axisRenderer = chartState._chartAxis._axisRenderersCollection[index];
axisRenderer._zoomFactor = zoomFactor;
if (chart.onZooming != null) {
ZoomPanArgs? zoomingArgs;
_bindZoomEvent(chart, axisRenderer, zoomingArgs, chart.onZooming!);
}
zoomPanBehaviorRenderer._createZoomState();
}
}