Just recently, we converted our website to use the new library loading
procedures outlined in the documentation (from google.load('visualization')
to google.charts.load)
As soon as the page loads, we have javascript firing that uses the google
charts library. We have the call to load the library within the <head> tag.
Previously, we never had issues with synchronization. If we did
google.load('visualization', '1.0', 'packages': { ['corechart'] }); by the
time we go to our javascript, it would execute properly with no exceptions.
Now that we're using the current library loading procedure, we're getting
errors at runtime which suggest the visualization library is still loading
by the time our javascript runs.
Is the library loading method asynchronous? I couldn't find anything
explicitly in the documentation that said so, though it seems like it is,
and that makes sense. I realize there is a feature to use a callback, which
is nice as you're waiting for the library to load, but I was curious if
there was any way to override that call to make it synchronous?
Additionally, if any users have come across a clever way to ensure that
none of your charts-dependent javascript runs until that library is loaded,
that would be helpful. I'm not quite sure what our best approach is going
to be, but I'm trying to blend our already-working code into this new
library feature.
--
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 [email protected].
To post to this group, send email to [email protected].
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/1a96bbd6-a250-42f4-a520-4886b821e157%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.