Handling dynamic data with Annotated timeline

36 views
Skip to first unread message

googelybear

unread,
Jan 13, 2009, 5:28:37 AM1/13/09
to Google Visualization API
Hi,

I'm using the timeline widget and I have created a bunch of checkboxes
from which the user can select which data series he wants to display
(as in GoogleFinance: http://finance.google.com/finance?q=AMEX:SPY).
The user can also enter new data. Currently I'm always re-
instantiating the timeline widget (with a new instance of the data
table) whenever a checkbox is selected or new data entered. This works
but it's not very nice. Is there a better way to handle dynamic data
(I'm
sure there is , but I just haven't discovered it yet)?

thanks, keep up the good work!

VizGuy

unread,
Jan 13, 2009, 7:18:33 AM1/13/09
to google-visua...@googlegroups.com
The way to deal with data modifications, is to call the draw function again (with a new data table), but not to instantiate the chart itself.
We are working on improving the redrawing of the chart in such cases, but the way to use it will probably be the same as today (hopefully, we will just be able to refresh the chart faster if the options are the same, and the data changes make it possible).

Regards,
VizGuy

googelybear

unread,
Jan 13, 2009, 11:01:01 AM1/13/09
to Google Visualization API
Thanks for the hint VizGuy. Just a remark: Wouldn't it be more
intuitive if "draw(table)" would use the _current_ options instead of
taking the defaults?
The only thing that's bothering me now is that the widget will
"flash" (go blank) for an instant when I call draw, but as you already
said, you're working on that ;)

VizGuy

unread,
Jan 13, 2009, 11:54:12 AM1/13/09
to google-visua...@googlegroups.com
There are reasons for both sides.
Without getting into all of them, we can start with the fact that this will be a change from the current spec, as today people may use it with no options when they want to fall back to the default options.

I believe that keeping the options from one call to the next is not a high barrier, and in fact, makes the request to redraw transparent, by the fact that you just use the same function as you do today.

Anyway - this is a different issue, and I wouldn't mix it with the refresh of this chart.

Regards,
VizGuy
Reply all
Reply to author
Forward
0 new messages