Hi,
I have a html page with 2 drop down menus and a set of radio buttons.
I want the user to be able to change the values in the menus press a
button and a new graph is rendered on page. ( don't want the page to
be reloaded, and the new data is retrieved using an AJax call).
For example, a user may pick 'Pie Chart' along with 'country' and and
'Population' and press the render graph button. The user should then
get a pie chart with the each slice representing a country. After this
the user may want to look at bar chart that displays GDP of
California from 2000 to 2010, so the user picks the relevant options
and presses the render graph button again.
My problem is I can't seem to get the graph to render. I can get the
graph to render if its loaded in the <script> tags like:
google.load("visualization", "1", { packages:['whatever']});
google.setOnLoadCallback(drawChart);
function drawChart() {
}
but if I want to render a new chart after the page is loaded by
calling a JavaScript function, which loads the visualization library
and calls 'google.setOnLoadCallback()' it does not work.
I'm obviously miss understanding something important about how the API
works, what is it?
Thanks
--
You received this message because you are subscribed to the Google Groups
"Google Chart API" group.
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-chart-api?hl=en.