简体   繁体   English

使用来自ASP.net中.CSV文件的数据实时显示图表

[英]Display a chart in Real time using the data coming from .CSV files in ASP.net

i am trying to display a real time graph using the data coming from different csv files, i need to take the data from the latest csv file and display it.I am new to ASP and i am using MVC3. 我正在尝试使用来自不同csv文件的数据显示实时图形,我需要从最新的csv文件中获取数据并显示它。我是ASP的新手,我正在使用MVC3。

This is my controller code for graph: 这是我的图形控制器代码:

            string[] _yval = ReadFile2ArrayFromChannel3();
            var bytes = new Chart(width: 1600, height: 100)
            .AddSeries(
            chartType: "Line", legend: "Abc", xField: "t", yFields: "mv",
                // xValue: _xval,
             yValues: _yval)
            .GetBytes("png");
            return File(bytes, "image/png");

ReadFile2ArrayFromChannel3() function is taking the data from a csv file. ReadFile2ArrayFromChannel3()函数从csv文件中获取数据。 I want to know how to change the values in runtime, since this graph controller is only being called once when i click on the action link from my ASP page. 我想知道如何在运行时更改值,因为当我单击ASP页面上的操作链接时,仅调用一次此图形控制器。 Thanks in advance. 提前致谢。

If you want to display a real time chart, you are using the wrong approach. 如果要显示实时图表,则使用了错误的方法。 My I suggest you look into something like Telerik Chart or Highchart 我建议您研究一下Telerik ChartHighchart

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

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