Search the Community
Showing results for tags 'get data from sql'.
Found 1 result
I like to get recommendations on how to automatically update the line chart with new data every couple of seconds (e.g. for every 3 seconds). Since I have 3 Y axes, the real-time line chart doesn't support 3 Y axes. Then I use the Line Chart, and use setInterval(..) to update the chart at a time interval. I am using the asp.net Core MVC project, and put the Fusionchart in a View (cshtml file). I have 7000 point data for each line, and have a total of 5 lines. The data is stored in SQL database. Reading all the data and display them take 40 seconds, the time is too long. Instead of reading 7000 points in one shot, I want to read 200 points from SQL database each time, and then display. Then read SQL for the next 200 points and display, and keep repeating. Each time, I want to append the new data points to the prior data. My problem is the controller gets the data, then give to View via ViewBag, it refreshes the View whole page, not very nice. How to just refresh the chart with new data when each time getting data from SQL? Since the setInterval is in View, how to request SQL data from View? ViewGraph.cshtml