ZoomPanOptions.AutoXFit

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
Matthias Weidmann
Posts: 16
Joined: Tue Jun 21, 2016 10:24 am

ZoomPanOptions.AutoXFit

Post by Matthias Weidmann » Tue Jun 21, 2016 11:41 am

Hello,

I want to display a x-y-chart with different characteristic diagrams. I have added a x and y axis with ValueType set to AxisValueType.Number.
Afterwards I have set the ViewXY.ZoomPanOptions.AutoYFit to true and was surprised that the counterpart AutoXFit is missing.

Is there another way beside implementing this feature by myself?
Are there plans to provide this feature in future?

Best regards,
Matthias Weidmann

ArctionKestutis
Posts: 555
Joined: Mon Mar 14, 2016 9:22 am

Re: ZoomPanOptions.AutoXFit

Post by ArctionKestutis » Tue Jun 21, 2016 1:16 pm

Hello Matthias,

You could call ViewXY.ZoomToFit() method (fits all axes so that all series data is shown, including x-axis). The same operation could be done with mouse - when mouse zooming is made from right to left. This is default behavior in LightningChart. You should have ZoomPanOptions.RightToLeftZoomAction = ZoomToFit, and RightToLeftZoomAction applies when LeftMouseButtonAction or RightMouseButtonAction is set to Zoom.

Sincirely,
Kestutis

Matthias Weidmann
Posts: 16
Joined: Tue Jun 21, 2016 10:24 am

Re: ZoomPanOptions.AutoXFit

Post by Matthias Weidmann » Wed Jun 22, 2016 8:40 am

Hello Kestutis,

using the ViewXY.ZoomToFit() method works for me to fit the current view.
Also the hint for the zoom behavior is great. Thanks for that!

If new points are added to the view, i'll have to call the ViewXY.ZoomToFit() method once again, right?

Sincere regards,
Matthias Weidmann

ArctionKestutis
Posts: 555
Joined: Mon Mar 14, 2016 9:22 am

Re: ZoomPanOptions.AutoXFit

Post by ArctionKestutis » Wed Jun 22, 2016 2:08 pm

Hello Matthias,

Yes, you need to call ZoomToFit() method, if you want see ALL your data all the time. There are other options, like adding vertical or horizontal scroll-bar (see "Scroll Bars" example).

Best regards,
Kestutis

Post Reply