Restore / Save zoom levels

Mar 27, 2013 at 6:33 AM
Morning all,

I have a requirement to save certain zoom levels on a graph which the user can undo...

Can we save the current zoom level for all the axes and then restore it (explicitly set them)?

Apr 29, 2013 at 3:42 PM
Me too trying to achieve the same. Did you had any luck??
Apr 29, 2013 at 4:11 PM
Try to subscribe to the AxisChanged event on the axes (note this event is also raised when panning/resetting the axes), save the ActualMaximum and ActualMinimum properties. Call the Zoom(x0,x1) method to restore the view. It is possible zooming with the mouse wheel or zooming several axes may be difficult to revert (multiple events), maybe you can use a stopwatch to 'group' these events?
Apr 29, 2013 at 6:17 PM
I have extended the control to store the zoom state on a stack and on all maniuplators started event I have pushed the zoom state. When I want to move to previous state I just pop a state and call the Zoom(axis,x0,x1) to set the previous state for the axis.

All my charts have two axis, for multiple axis one can store the axis and its current max and min.