简体   繁体   中英

Oxyplot minimum autoscale range

I am using oxyplot to create line series charts in my c# application.

The data is loaded in real time as a test progresses.

I am currently using LinearAxis.MinimumRange to prevent auto scaling to zoom right into the data to prevent the screen being filled with noise at the start of the test before values start changing.

However, by design this property limits how far the user is able to zoom in, is there a simple way beyond hooking into the scale changed events to achieve the functionality I want which is, to put it more simply, a default plot size that when exceeded autoscaling kicks in.

My solution to this ended up being wrap adding points into my own function (I am directly manipulating LineSeries.Points).

Now I just set min and max when setting up my axes and then when adding a point, check if it is outside these limits, if they are set the limits to NaN so autoscale resumes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM