Thanks for diting the example.

Interesting you mentioned creating the DataTable object before the script 
finishes.  That's actually how the Google Visualization Playground is 
written - if you visit 
http://code.google.com/apis/ajax/playground/?type=visualization#sort_event 
and click "Edit HTML" you'll see they're creating the DataTable outside of 
the script loading callback.  

Is that because the DataTable is loaded in the js.api script (included 
before the code)?  Or is it because in the Playground they load the Google 
apis ahead of time anyway?  Or are they just getting lucky?

If it's not the first, GVIZ should probably update the example code to 
something safer.  That could be why I've seen others having problems when 
they execute library calls before the library loaded; they might be 
following this model.

Secondly, it does seem like a new chart is created.  Hooking into the 
wrapper's "ready" event seems like the best way to add events.  The "ready" 
event is with the Wrapper, which isn't recreated, but the "sort" event is 
with the chart, which is deleted each time the chart is redrawn.  Makes 
sense.

thanks,


-- 
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/-/QWSMU5g1wgcJ.
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