Hi @all!
In my html-page I have a piechart. The data is grapped from a
sqlite-database. The code for grabbing the data and printing the chart is
organized in an extra js-file. In this file I load the google-APIs
dynamically and on callback I draw the first chart on loading the website.
So far, all is working fine.
The js-code for doing that:
function initLoader() {
var script = document.createElement("script");
script.src = "https://www.google.com/jsapi?callback=drawFirstChart";
script.type = "text/javascript";
document.getElementById('header').appendChild(script);
};
function drawFirstChart() {
google.load("visualization", "1", {packages:["corechart"], "callback":
initialize});
};
With initialize the chart is drawn.
To manipulate the chart, the users can select from different values in a
dropdown-list. When the new value is selected, there will be called a
second method for updating the chart:
function drawSecChart() {
google.load("visualization", "1", {packages:["corechart"], "callback":
initialize2});
};
This method causes an error "google not defined". Now, I am confused,
because the API is allready loaded...
How can I access "google"? Or is there another solution for that problem?
Any hints would be usefull.
Thanks!
--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.