I don't know if you can include your js in the same script that you call 
Google's jsapi from (I've never seen it done, and it didn't work when I 
tried it on the visualization playground).  Separate them out, load the 
Google visualization API, and replace the onload function in your body tag 
with google.setOnLoadCallback():

<script type="text/javascript" src="http://www.google.com/jsapi"; />
<script>
google.load('visualization', '1', {packages: ['corechart']});
google.setOnLoadCallback(init);

function init() {
     graph1(1);
     graph2(2);
}
...rest of your code...
</script>

setOnLoadCallback takes a function as a parameter (I arbitrarily made one 
named init), not a function call:

// this works:
google.setOnLoadCallback(init);

// this fails:
google.setOnLoadCallback(graph1(1));

Give that a spin and see if it works.

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