实时WPF图表.Net 4

发布于 2024-09-29 02:16:41 字数 233 浏览 2 评论 0原文

我正在开发一个诊断工具,每 25 毫秒接收一次数据。我需要使用 lineSeries 在图表中绘制这些数据。我正在使用带有 lineSeries 的 wpf 图表,我将其在 xaml 中绑定到 ObservebleCollection。

问题是我需要集合需要包含至少 1600 个数据点,然后才能开始从前面删除它们。

我知道 25 毫秒对于在 wpf 中绘图来说是很短的时间。有人能解决我的问题吗?

问候

I'm working on a diagnostic tool and receives data every 25 ms. I need this data to be drawn in my chart using a lineSeries. I'm using a a wpf chart with a lineSeries which I bind in xaml to an ObservebleCollection.

The problem is that I need the collection needs to contain atleast 1600 datapoints before starting to remove them at the front.

I understand that 25 ms is a short tiem then it comes to drawing in wpf. Dose anyone have any solution to my problem?

Regards

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

毁梦 2024-10-06 02:16:41

您应该查看 SciChart,它可以处理 1 毫秒的数据更新。它像游戏循环一样渲染,因此仅在附加新数据且 UI 线程空闲时才进行绘制。有关更多信息,请访问 www.scichart.com/wpf-chart-features,其中显示了功能并讨论了表现。

输入图片此处描述

披露:这是我自己的组件,因此如果您有任何问题,请询问!

You should check out SciChart, which can handle data updates at 1ms. It renders like a game-loop, so only draws when new data is appended and the UI thread is free. Some more information at www.scichart.com/wpf-chart-features which shows the features and talks about performance.

enter image description here

Disclosure: It's my own component, so ask any questions if you have them!

不乱于心 2024-10-06 02:16:41

我建议您使用使用 WritebleBitmap 而不是形状的自定义绘图例程,并在固定区域一次一段地绘制线条,而无需任何滚动。当您在绘图区域右侧达到 1600 点时,请重新开始。也许一些视觉指示器(如垂直线或其他东西)会有助于感知。

我认为没有任何图表库旨在每 25 毫秒更新 1600 点线。

I'd suggest you use a custom made drawing routine utilizing WritebleBitmap instead of shapes and draw your lines in a fixed area one segment at a time without any scrolling. The, when you reach 1600 points at the right side of your plot area, start over. Maybe some visual indicator (like vertical line or something) would help perception.

I don't think there any charting libraries targeted at updating 1600 point line every 25ms.

死开点丶别碍眼 2024-10-06 02:16:41

我有一个 .NET 应用程序,可以以 33 毫秒的间隔绘制许多测量结果。我测试了许多图表解决方案来完成此任务,但我发现的唯一真正可行的选择是 Arction LightningChart (http://www.arction.com)。闪电图可以很容易地完成你想要的事情,我认为你可以免费获得基本版本。缺点是对 DirectX 和 SlimDX 库的依赖。您可以从该网站下载的试用版将为您提供有关如何在 WPF 和 Windows 窗体中使用此控件的很好的示例。

I have a .NET application that charts many measurements on a 33ms interval. I tested a number of charting solutions to accomplish this task, but the only real viable option I found was Arction LightningChart (http://www.arction.com). Lightning Chart will do what you want pretty easily, and I think you can get the basic version for free. The downside will be a dependency on DirectX and the SlimDX library. The trial that you can download from the site will give you pretty good examples of how to use this control in WPF and Windows Forms.

南风起 2024-10-06 02:16:41

通过 WindowsFormsHost 控件使用 Microsoft Chart for WinForms。 MS-Chart 可以很好地处理这样的数据速率。它内部使用WritableBitmap方法,因此既快速又稳定。另外,不要忘记将系列类型设置为 FastLine 以避免速度变慢。

我在 codeproject 上创建了一篇“提示”文章,试图强调 MS-Chart 上的这种高数据量使用情况。您甚至可以将计时器间隔更改为 1 毫秒。并查看显示数据没有问题。

该文章位于 http://www.codeproject.com/Tips /1006180/在 WPF 中使用 Microsoft-Chart-in-WPF

Use Microsoft Chart for WinForms using the WindowsFormsHost control. MS-Chart can handle such data rates well. It internally uses the WritableBitmap method, so it is both fast and stable. Also, don't forget to set the series type to FastLine to avoid slowdown.

I've created a "Tip" article on codeproject which tries to highlight this type of high-data volume usage on MS-Chart. You can change the timer interval to even 1 ms. and see that there is no issue in showing the data.

The article is at http://www.codeproject.com/Tips/1006180/Using-Microsoft-Chart-in-WPF

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文