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: Queue Moderators

Post Reply
SupportArchives
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
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

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

Post Reply