当前位置:去问问>生活百科>怎样使visifire的数据源能够实时更新

怎样使visifire的数据源能够实时更新

2024-10-20 11:19:34 编辑:zane 浏览量:555

怎样使visifire的数据源能够实时更新

的有关信息介绍如下:

怎样使visifire的数据源能够实时更新

private DataSeries GetSerDataSeries(RenderAs type){DataSeries dataSeries = new Visifire.Charts.DataSeries();dataSeries.RenderAs = type;Visifire.Charts.DataPoint dataPoint;Random rand = new Random(DateTime.Now.Millisecond);for (int i = 0; i < 6; i++){dataPoint = new Visifire.Charts.DataPoint();dataPoint.AxisXLabel = GetTitle(i);dataPoint.YValue = rand.Next(10, 200);dataSeries.DataPoints.Add(dataPoint);}return dataSeries;}private void SetChartData(Chart tagChart, string topTitle, string xTitle, string yTitle, RenderAs type){tagChart.View3D = true;if (!string.IsNullOrEmpty(topTitle)){Visifire.Charts.Title title = new Visifire.Charts.Title();title.Text = topTitle;tagChart.Titles.Add(title);}if (!string.IsNullOrEmpty(xTitle)){Axis x = new Axis();x.Title = xTitle;tagChart.AxesX.Add(x);}if (!string.IsNullOrEmpty(yTitle)){Axis y = new Axis();y.Title = yTitle;tagChart.AxesY.Add(y);}DataSeries dataSeries = new Visifire.Charts.DataSeries();dataSeries.RenderAs = type;Visifire.Charts.DataPoint dataPoint;Random rand = new Random(DateTime.Now.Millisecond);for (int i = 0; i < 24; i++){dataPoint = new Visifire.Charts.DataPoint();dataPoint.YValue = rand.Next(10, 100);dataSeries.DataPoints.Add(dataPoint);}tagChart.Series.Add(dataSeries);}这是我写的二个方法,看看是否有所帮助。

版权声明:文章由 去问问 整理收集,来源于互联网或者用户投稿,如有侵权,请联系我们,我们会立即处理。如转载请保留本文链接:https://www.qwenw.com/life/404782.html
热门文章