This is my first time trying out this system.
I'd like to point out that its setup is quite complicated as opposed to
just throwing a script tag on a page. But this is mostly a problem with
Google JS API.
The next complaint (which is the object of this post) is the fact that try
as I might, I can't get an existing chart to update, without having it
redrawing itself completely.
I couldn't figure out this problem so in the end, I just copy & pasted the
code in question on my website - to no effect!
The code I've been using:
function drawVisualization() {
// Create and populate the data table.
var d= google.visualization.arrayToDataTable([
['Label', 'Value'],
['Memory', 80]
]);
// Create and draw the visualization.
var v = new google.visualization.Gauge(document.getElementById(
'visualization'));
v.draw(d);
// The following fails on my site
setInterval(function(){
d.setValue(0, 1, Math.round(Math.random()*99));
v.draw(d);
}, 500);
}
Go on, try it out here.
The effect I'm getting is that the chart, on each iteration, is redrawn
from scratch a little smaller than it was previously.
I also noticed two network requests to "about:blank"
I know this sounds strange (impossible even), but I can't figure out what's
going wrong here.
Perhaps it may be of interest the fact that I'm running this along side
html5shif.js and jhtmlarea.js
Regards,
Chris.
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-visualization-api/-/fkz3NEqLELkJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.