Auto scale y axis

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
Igor
Posts: 67
Joined: Mon Sep 28, 2015 1:14 pm

Auto scale y axis

Post by Igor » Mon Dec 21, 2015 10:07 am

Hi,

the PointLineSeries has to adjust automatically to the Y axis.
Currently I have implemented it by creating a timer which calls once time in a second an Axis.Fit(...)

The problem is that the current focus getting lost when the method were called
for example when user drags the legend box. The legend box will be dropped at current location
when the Axis.Fit(...) method were called.

Is there a better way to do this?

thank you very much

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: Auto scale y axis

Post by ArctionPasi » Tue Dec 22, 2015 12:08 pm

Probably you are using some other timer than System.Windows.Forms.Timer? This timer waits until UI thread is free for fitting.

Configuring ZoomPanOptions.AutoYFit like this, works correctly at least:
autofit_properties.jpg
autofit_properties.jpg (18.13 KiB) Viewed 7394 times
It's using System.Windows.Forms.Timer under the hood.
LightningChart Support Team, PT

Igor
Posts: 67
Joined: Mon Sep 28, 2015 1:14 pm

Re: Auto scale y axis

Post by Igor » Tue Dec 22, 2015 12:29 pm

oh...I see.
Ok, it works fine for me, thank you.

Post Reply