How to set YAxes'range automaticly?

A forum dedicated to WPF version of LightningChart Ultimate.
Post Reply
coldsun1982
Posts: 12
Joined: Thu Feb 28, 2019 1:57 am

How to set YAxes'range automaticly?

Post by 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?

Arction_LasseP
Posts: 44
Joined: Wed Mar 27, 2019 1:05 pm

Re: How to set YAxes'range automaticly?

Post by 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;

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

Re: How to set YAxes'range automaticly?

Post by coldsun1982 » Tue Apr 23, 2019 2:51 pm

Thank you.

Post Reply