Hi Folks,
I want to use the annotated timeline as a realtime graph. i.e.
Something that updates every n seconds. when I call the .draw method,
it flickers (actually vanishes) and then comes back with the data. Is
there a way to stop it?
Simple code is:
var mainChartData = new google.visualization.DataTable();
mainChartData.addColumn('datetime', 'Date');
mainChartData.addColumn('number', 'Watts');
mainChartData.addColumn('string', 'title1');
mainChartData.addColumn('string', 'text1');
//from button. Draw the graph
function testMe2() {
var chart = new google.visualization.AnnotatedTimeLine
(document.getElementById('myusageMainGraph'));
chart.draw(mainChartData, { displayAnnotations: true });
}
var f = 0;
//called from another button. will be a timer.
function testMe3() {
var chart = new google.visualization.AnnotatedTimeLine
(document.getElementById('myusageMainGraph'));
mainChartData.addRows(1);
var dt = new Date();
dt.setDate(dt.getDate() + f);
mainChartData.setValue(f, 0, dt);
mainChartData.setValue(f, 1, f);
chart.draw(mainChartData, { displayAnnotations: true });
//flickers.
f++;
}
thanks.
Crispin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
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
-~----------~----~----~----~------~----~------~--~---