How to set YAxes'range automaticly?

A forum dedicated to WPF version of LightningChart Ultimate.

How to set YAxes'range automaticly?

Postby coldsun1982 » Sat Apr 20, 2019 8:59 am

Hi, when creat chart, I usually use "chart.ViewXY.YAxes[0].SetRange(min, max);". Now, I want to set this range automaticly because I don't konw the value of YAxes when it is working, how to do it?
coldsun1982
 
Posts: 12
Joined: Thu Feb 28, 2019 1:57 am

Re: How to set YAxes'range automaticly?

Postby Arction_LasseP » Tue Apr 23, 2019 1:49 pm

Hello,

There is AutoYFit -option available in ZoomPanOptions, which regularly updates the y-axis range to show all the data. It could be useful here. AutoYFit is also configurable, for example the update interval can be changed.

Code: Select all
_chart.ViewXY.ZoomPanOptions.AutoYFit.Enabled = true;
Arction_LasseP
 
Posts: 39
Joined: Wed Mar 27, 2019 1:05 pm

Re: How to set YAxes'range automaticly?

Postby coldsun1982 » Tue Apr 23, 2019 2:51 pm

Thank you.
coldsun1982
 
Posts: 12
Joined: Thu Feb 28, 2019 1:57 am


Return to LightningChart Ultimate WPF

Who is online

Users browsing this forum: No registered users and 12 guests