I am using Google Charts for a Dashboard web app and need to put in the functionality to periodically refresh the page.
I set up some quick code that basically resubmits the form whenever a JS timer is finished.
function timerTick() {
window.setTimeout("timerTick()", 15000);
document.forms["input"].submit();
}
I have a form that makes ajax calls to get the data in Json format.
I then go through the data and populate my google chart objects.
The problem is, the browser uses more and more memory, and eventually crashes.
I've tried making all the chart variables global, and setting them to null before I fetch new data, but that helped only a small amount.
I've also tried the following:
$("chart_div").empty();
$("chart_div2").empty();
$("chart_table").empty();
Just to clear all the chart data from the DOM, but it looks like garbage collections just won't work without a page refresh.
Any help identifying possible memory hogs or ways to get Garbage collection work more immediately would be awesome.
Preemptive thanks.