reset method
void
reset()
Returns the plot area back to its original position after zooming.
Implementation
void reset() {
final RenderBehaviorArea? parent = parentBox as RenderBehaviorArea?;
if (parent == null) {
return;
}
parent.hideInteractiveTooltip();
final RenderCartesianAxes? cartesianAxes = parent.cartesianAxes;
if (cartesianAxes == null) {
return;
}
RenderChartAxis? child = cartesianAxes.firstChild;
while (child != null) {
child.controller.zoomFactor = 1.0;
child.controller.zoomPosition = 0.0;
if (parent.onZoomReset != null) {
_bindZoomEvent(child, parent.onZoomReset!);
}
final CartesianAxesParentData childParentData =
child.parentData! as CartesianAxesParentData;
child = childParentData.nextSibling;
}
parent.invalidate();
}