I would guess this is because it passes data through the flashvars
attribute of the object/embed tag, and therefore, the entire Flash
code is reinitialized by replacement. You're probably looking to do
something like this: http://timefire.com/showcase/#DATASET_MUTATION

which would mean a more fine-grained two-way sync between datatable
and the underlying chart in order to accomplish efficiently. Probably
an update() method should be made available in addition to draw()
which ships data across the Flash External Interface.

-Ray


On Fri, Feb 20, 2009 at 2:40 PM, Crispin <[email protected]> wrote:
>
> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to