Page 1 of 1

Mouse Right To Left Zoom Action

Posted: Fri Feb 09, 2018 9:22 am
by SteMurphy131
I'm wondering is there a way to hook into the event raised when this code is called:

_chart.ViewXY.ZoomPanOptions.RightToLeftZoomAction = RightToLeftZoomActionXY.ZoomToFit;

I want to call my own Zoom To Fit method to give an extra bit of space on the Y axis.

Thanks

Re: Mouse Right To Left Zoom Action

Posted: Wed Feb 14, 2018 2:44 pm
by ArctionKestutis
Sorry for the delayed answer.
Actually ZoomToFit() method modifies Axis ranges saliently (checks chart size, estimates range based on AspectRatio and changes range for X/Y axis if found it necessary).
Probably the only way is to set RightToLeftZoomAction = OFF and build your own custom MouseEvent handling. See for the idea on viewtopic.php?f=16&t=1003&p=3613
There is one quick and dirty way: enable ViewXY.ZoomPanOptions.AutoYFit, modify AutoYFit.UpdateInterval and AutoYFit.MarginPercents.

All the best.

Re: Mouse Right To Left Zoom Action

Posted: Thu Feb 15, 2018 10:19 am
by ArctionPasi
Also ViewXY.Zoomed and BeforeZooming events are available.

And RangeChanged event of axes.