You must be logged in to post your query.
Home › Forums › Chart Support › Auto refresh Graph with some particular time duration
Kindly zip the .sln file including the complete project with necessary dependencies(You can find the complete project in the location in which you have saved your project) along with .mdf and the .ldf file for the sample database, upload it to Google-Drive or Onedrive and share the link with us.
__
Priyanka M S
Team CanvasJS
https://drive.google.com/open?id=1o2Q5kd10eJO4kbgazbz8CuWe5HAywEws
Please refer above link for sample project which i have tried and try to find a solution
Below is the sample data which i have created on database
https://drive.google.com/open?id=1y8gIsYpOhcU0-P3aCONvCu7L8jtIaAa7
https://drive.google.com/open?id=1o2Q5kd10eJO4kbgazbz8CuWe5HAywEws
Please refer this link for sample project which i have tried
https://drive.google.com/open?id=1pObxzHUL7AyOif5bT61Cnc5t7iS3n7sN
Please be go through above link for database
Hello Priyanka M S,
Could please share some sample project in which we are going to refresh the chart with in a some particular time duration using Asp.net mvc and sql
Please provide some sample database which is working fine.
Please take a look at this sample project in ASP.Net MVC which updates chart data every 2seconds (which can be changed as per your requirements) by reading data from database.
—
Vishwas R
Team CanvasJS
Hello Vishwas R,
In my project it was not displaying any values on graph
I have 2 columns on my table names as stock on x-axis and head in y-axis and name of the table name as db.kpi
Let me know why it was not displaying any data
Thanks and regards,
mahesh
Hello,
I have tried your example again there should be some bugs
If i try to change the any value on database which i have already created is not updating on graph and in the same way delete also not working
For example in database we have 2 columns x and y
x y
1 10
2 20
If i need change
x y
1 20
2 30
In the same way delete also
x y
1 20
If i can delete row 2
In these both scenarios graph is not updating.
let me know the reason why this was not updating
In my project it was not displaying any values on graph
I have 2 columns on my table names as stock on x-axis and head in y-axis and name of the table name as db.kpi
Let me know why it was not displaying any data
The sample project that you have shared is not working as it doesn’t include all dependency files. However when I looked into view (index.cshtml), you seemed to be creating new chart instance on every update. I would suggest you to create chart instance once and update dataPoints on every update and re-render the chart.
I have tried your example again there should be some bugs
If i try to change the any value on database which i have already created is not updating on graph and in the same way delete also not working
While updating chart dataPoints, you can empty dataPoints array and update it according to the updated data which you receive from database as shown in this updated sample project.
—
Vishwas R
Team CanvasJS
Hello Vishwas R ,
time refresh is working fine only of both data types are int.
But Here my data types are one is string another is int.
could you plase share some live example which cab be working fine in all instances
in my database i have 2 fileds
x y
string1 100
string2 50
Thanks & Regards
Mahesh Reddy
Hello Vishwas R ,
In view we are giving static time intervel.In my requirement i want to give time intervel from database.
I have tried a lot but didn’t get a solution. could you please help me.
Example in database i have created a table for time intervel in that i am going to assign time intervels like this
Graph1-10000sec
Graph2-20000sec
Thanks & Regards
Mahesh Reddy
You must be logged in to reply to this topic.