Area charts and line charts redraw bring to a high memory usage status

49 views
Skip to first unread message

Massimo

unread,
Jul 13, 2010, 11:41:40 AM7/13/10
to Google Visualization API
Hi,

I am writing a web page that receive new data externally every second
and draw an area chart.

Every time i receive new data I update the DataTable and I draw again
the chart.

Everything is fine except that the memory used by the browser increase
and increase reaching unacceptable values after some minutes. This
thing doesn't happen at all if i use the annotated time line.

Is it a bug?

Cheers,

Massimo

Viz Kid

unread,
Jul 14, 2010, 11:53:32 AM7/14/10
to google-visua...@googlegroups.com

Hi.

Can you tell us which packages are you loading, namely if you are using the new charts (package 'corechart') or the older version (packages 'linechart' and 'areachart')?

Best,
  Viz Kid


--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To post to this group, send email to google-visua...@googlegroups.com.
To unsubscribe from this group, send email to google-visualizati...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.


Massimo

unread,
Jul 15, 2010, 7:22:14 AM7/15/10
to Google Visualization API
Hi,

I am using corechart package.

Cheers,

Massimo
> > google-visualizati...@googlegroups.com<google-visualization- api%2Bunsu...@googlegroups.com>
> > .

mgenti

unread,
Jul 29, 2010, 11:15:27 AM7/29/10
to Google Visualization API
I am also seeing the same problem when viewing an updating chart in
Internet Explorer. I have tried both the linechart and corechart
packages but both exhibit the same problems. Here is an example that
shows constantly increasing memory in IE:
<html>
<head>
<script type="text/javascript" src="https://www.google.com/
jsapi"></script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["linechart"]});
//google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(onLoad);


var chart;
var data;
var chart_options = {width: 580, height: 179};
var MAXROWS = 30;


function tester() {
data.addRow([Math.floor(Math.random()*50)]);
if (data.getNumberOfRows() > MAXROWS) {
data.removeRow(0);
}
chart.draw(data, chart_options);
}

function onLoad() {
data = new google.visualization.DataTable();
data.addColumn('number', 'Line1');

chart = new
google.visualization.LineChart(document.getElementById('chart_div'));
chart.draw(data, chart_options);
setInterval(tester, 1000);
}
</script>
</head>
<body>
<div id="chart_div"></div>
</body>
</html>

Massimo

unread,
Jul 29, 2010, 12:01:55 PM7/29/10
to Google Visualization API

Viz Kid

unread,
Aug 18, 2010, 5:29:31 PM8/18/10
to google-visua...@googlegroups.com

Hi again.

We hope that this issue was just fixed in our most recent release.
Please let us know if you still see this problem (or others).

Best,
  Viz Kid

To unsubscribe from this group, send email to google-visualizati...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages