简体   繁体   English

Oxyplot最小自动量程范围

[英]Oxyplot minimum autoscale range

I am using oxyplot to create line series charts in my c# application. 我正在使用oxyplot在c#应用程序中创建折线图。

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. 我目前正在使用LinearAxis.MinimumRange来防止自动缩放以向右缩放数据,以防止在值开始更改之前在测试开始时屏幕被噪声填充。

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). 我对此的解决方案最终是将点包装到我自己的函数中(我直接在操作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. 现在,我只是在设置轴时设置了最小值和最大值,然后在添加点时检查它是否在这些限制范围之外,如果将它们设置为NaN限制,则将恢复自动缩放。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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