Storing data from previous charts

Share RGraph:   Share or Like RGraph on Facebook!

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by James Gardner on 12th February 2013
I am using rGraph to display data from a database and between a user selected range.

When the user selects the date range and opens the graph it displays correctly.

If they subsequently choose a different date range, it will only show the data from the first selection, even though the data file has all the data in it and the graph scales are correct.

The way around it is to clear the history and cache after every selection. Is there something I'm missing or that I can do to stop the browser remembering the first selected graph?
Posted by RGraph support on 13th February 2013
Hi,

You could try resetting the canvas and/or clear the ObjetRegistry:

canvas = document.getElementById("cvs");

RGraph.ObjectRegistry.Clear(canvas);
RGraph.Reset(canvas);

Richard, RGraph Support
Posted by James Gardner on 13th February 2013
Thanks Richard.

I have sorted it now, the browser was caching the javascript file I was loading the data into and not redownloading it.

I solved it by adding a random query string after the file name so it loads it every time.

Cheers

James

Add a reply




« Back to message list