本文介绍了尝试更新X轴 - Windows窗体实时图表绘图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

在网上搜索后我无法解决问题,所以我决定在这里寻求指导。如果类似话题已经得到解答,我深表歉意。

after searching through internet I couldn't solve my problem, so I decided to seek guidance here. I apologize if similar topic has already been answered.

所以这是我的问题,我通过蓝牙从我的微控制器接收温度数据,我想绘制它,x是时间和是温度。

So here is my problem, I am receiving temperature data from my microcontroller via bluetooth, and I want to plot it, with x being time and y being temperature.

[code]

[/ code]

方法private void UpdateTemperatureChart()正在更新Chart。

method private void UpdateTemperatureChart() is doing update of Chart.

我这样直线:

[url = https://postimg.org/image/eidgvcjb7/] [img] https:/ /s29.postimg.org/y084bag93/Capture.jpg [/ img] [/ url]

[url=https://postimg.org/image/eidgvcjb7/][img]https://s29.postimg.org/y084bag93/Capture.jpg[/img][/url]

如果我不增加刻度变量,我最终会正确更新Y轴,当然在这种情况下,x不会更新。

If I do not increment tick variable I end up with having Y axis updated correctly, of course x isn't updated in that case.

[url = https://postimg.org/image/xvbhpa7ah/] [img] https://s12.postimg.org/5v7e503u5 /Capture.jpg [/ img] [/ url]

[url=https://postimg.org/image/xvbhpa7ah/][img]https://s12.postimg.org/5v7e503u5/Capture.jpg[/img][/url]

我使用Spline类型的图表。

I am using Spline type of chart.

[url = https:// postimg .org / image / so8ob0fpv /] [img] https://s13.postimg.org/3uz4acwpj/Capture.jpg [/ img] [/ url]

[url=https://postimg.org/image/so8ob0fpv/][img]https://s13.postimg.org/3uz4acwpj/Capture.jpg[/img][/url]

我很抱歉,如果这个这是一个愚蠢的问题,但我真的没有C#的经验,这实际上是我的第一个项目。

I am sorry if this is a stupid question, but I am really not experienced in C# that much, this is actually my first project in it.

推荐答案

感谢您发布在这里。

根据你的问题与Winform有关,我会把它移到
Windows Forms General
论坛以获得合适的支持。

According to your question is more related to Winform, I will move it to Windows Forms General forum for suitable support.

此论坛讨论并询问C#编程语言,IDE,库,示例和工具。

This forum discuss and ask the C# programming language, IDE, libraries, samples and tools.

最好的问候,

Wendy


这篇关于尝试更新X轴 - Windows窗体实时图表绘图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-14 16:41