Page 1 of 1

Auto scale y axis

Posted: Mon Dec 21, 2015 10:07 am
by Igor
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

Re: Auto scale y axis

Posted: Tue Dec 22, 2015 12:08 pm
by ArctionPasi
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 7435 times
It's using System.Windows.Forms.Timer under the hood.

Re: Auto scale y axis

Posted: Tue Dec 22, 2015 12:29 pm
by Igor
oh...I see.
Ok, it works fine for me, thank you.