Zoom to specific level / un-zoom

Need help in implementing some specific function to your LightningChart Ultimate powered application? Post a question and get code snippets from other LightningChart Ultimate community members.

Moderator: Arction_LasseP

Posts: 16
Joined: Tue Mar 26, 2013 11:01 pm

Zoom to specific level / un-zoom

Post by SupportArchives » Sun Apr 28, 2013 9:13 pm

I have zoomed in the ViewXY graph. How to return the axis ranges to my default values by mouse? Or can I return to previous zoom level?

User avatar
Posts: 1366
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland

Re: Zoom to specific level / un-zoom

Post by ArctionPasi » Sun Apr 28, 2013 9:15 pm

You can use the Revert feature (means “restore pre-defined range values). ViewXY.ZoomPanOptions has RightToLeftZoomAction, set it to RevertAxisRanges. Axes have RangeRevertMinimum and RangeRevertMinimum properties. Store new values there which you want to use as un-zoom values. You can change the values as you want when running the software, for example when you make a zoom in, axis RangeChanged event handler would be suitable place. When you make the right to left zoom gesture next time, it’ll set the range to these revert ranges.
LightningChart Support Team, PT