MSDN图表改变点值的实时? [英] MSDN charts changing point values realtime?

查看:304
本文介绍了MSDN图表改变点值的实时?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用MSDN图表来表示的实时数据。我现在是远程登录应用程序获得。出于测试目的,我添加了一个按钮,手动更改图表。我手工制作图表,它与上X.该系列产品是由它命名的值不同的值X轴0到5分的默认系列1。

I want to use MSDN charts to represent realtime data i'm getting from a telnet application. For testing purpose i have added a button to alter the chart manually. I manually made the chart and it has 0 to 5 points on the X axis with values different values on the X. The series is named by it's default "Series1".

我试过如下:

chart1.Series [系列1] Points.ElementAt(0).SetValueY(40); //什么也没有发生。

chart1.Series["Series1"].Points.ElementAt(0).SetValueY(40); //Nothing happens

chart1.Series [系列1] Points.ElementAt(1).SetValueXY(1,20); //什么也没有发生。

chart1.Series["Series1"].Points.ElementAt(1).SetValueXY(1, 20); //Nothing happens

chart1.Series [系列1]点[0] .SetValueY(40)。 //什么也没有发生。

chart1.Series["Series1"].Points[0].SetValueY(40); //Nothing happens

chart1.Series [系列1] Points.ElementAt(1).YValues​​.SetValue(10,0); //什么也没有发生。

chart1.Series["Series1"].Points.ElementAt(1).YValues.SetValue(10, 0); //Nothing happens

chart1.Series [系列1] Points.Clear()。 //删除所有点像它应该。

chart1.Series["Series1"].Points.Clear(); //Removes all points like it should.

让我怎么改变运行数据点条目?

So how do i change datapoint entries on runtime?

-EDIT-
。如果我使用 chart1.Series [系列1]修改点Points.ElementAt(0).SetValueY(40); 并在此之后添加点与 chart1.Series [系列1] Points.AddXY(1,40); 修改后的点也扣入它的修改地点。结论是,改性不改变它的点的Y值,但图中没有得到刷新。该功能AddXY()似乎自动刷新。我似乎无法找到一个方法来手动调用刷新()。

-EDIT- If i modify a point using chart1.Series["Series1"].Points.ElementAt(0).SetValueY(40); and add a point after this with chart1.Series["Series1"].Points.AddXY(1, 40); the modified point does snap into it's modified place. The conclusion is that modifying does change the points Y value but the graph does not get refreshed. The function AddXY() seems to autorefresh. I cannot seem to find a way to call Refresh() manually.

推荐答案

呼叫 chart1.Refresh( )修改完毕;这将迫使图表重绘,拿起新的值。

Call chart1.Refresh() after changing the value; it will force a redraw of the chart, picking up the new values.

这篇关于MSDN图表改变点值的实时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆