Is there a callback to tell me when my table is ready?

18 views
Skip to first unread message

Bill Bohling

unread,
Apr 1, 2016, 8:36:20 AM4/1/16
to Google Visualization API
I'm occasionally experiencing a lag when initializing a new table with:

table = new google.visualization.Table(document.getElementById('google-chart'));

To fix that I want to use a jQuery Deferred, so I'm trying to find a table callback that the table has loaded to tell me when I can resolve my Deferred:

var tableDeferred = $.Deferred();
table = new google.visualization.Table(document.getElementById('google-chart'));
table.<callback indicating table has loaded> = function() {
  tableDeferred.resolve()
}



Sergey Grabkovsky

unread,
Apr 1, 2016, 9:39:16 AM4/1/16
to Google Visualization API
Hi Bill,

You can use the 'ready' event to alert you that any visualization (including Table) has finished rendering. Here is an example of doing that: http://jsfiddle.net/cond05ko/

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/71c549d8-ff63-447d-9054-ce8087a0ab86%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

unnamed.gif

Sergey Grabkovsky

Software Engineer

Google, Inc

gra...@google.com


Reply all
Reply to author
Forward
0 new messages