The google loader has problems when being called from inside other 
functions, and it appears to have something to do with the way the callback 
is handled.  If you have code like this:

function foo () {
    google.load('visualization', '1.0', {packages:['corechart']});
    google.setOnLoadCallback(drawChart);
}

it fails, but if you write it like this:

function foo () {
    google.load('visualization', '1.0', {packages:['corechart'], callback: 
drawChart});
}

it works fine.  Give that a try and see if it works for you.

On Friday, July 26, 2013 6:23:21 AM UTC-4, Jean-Marc Collin wrote:
>
> Hello,
>
> I would like to load the API on demand (on click on a button for example) 
> in order to get the API initialized with the correct language.
> But when I do :
>
> google.load('visualization', '1.0', {'packages':['corechart', 'controls'], 
> 'language': lang });
>
> after the application is started, the page becomes empty and the only html 
> code resulting is <html></html>.
>
> I cannot figure why.
> Any help would be greatly appreciated.
>
> JM.
>

-- 
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 http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to