Question

When my chart updates, new columns are added every time:

What currently happens

And this is the line of code that causes that in my DataProvider (C#):

Response.Write ("&label=" + label + "&value=" + randomValueCr1 + "|" +randomValueCr4 + "|" + randomValueCr5);

What I would like instead is to update the current values of a column that already exists. So in the example above, instead of there being many columns for the same day of the week, there will only be one column per-day, containing the most recent data.

I read through a lot of the documentation but couldn't find out how to do this.

Was it helpful?

Solution

Answering my own question

I was going about it the wrong way. It is not possible to update value that are already in the chart from the server side, what yo must do is update all columns every time, and to get the illusion of updating a single column, you must save the values of the other columns and draw them in exactly the same every time.

In your <chart> options, set a fixed number of columns:

numDisplaySets='7'

And then in your server-side response, the format would be something like this:

&label=Mon,Tue,Wed,Thu,Fri,Sat,Sun&value=26,85,23,69,97,28,61|81,45,25,30,14,85,92|29,35,53,79,55,66,30

(where there are 7 comma seperated values, seperated by "|" ).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top