thx

2011/6/15 Riccardo Govoni <[email protected]>

> There is some confusion in your script. The sequence of events should be:
>
> google.setOnLoadCallback(drawVisualization);
>
> function drawVisualization() {
>   // Visualization API is loaded, fetch data from spreadsheet.
>   var query = new google.visualization.Query(
>     'THIS IS MY GOOGLE SPREADSHEET URL');
>
>   query.send(handleQueryResponse);
> }
>
> function handleQueryResponse(response) {
>   if (response.isError()) {
>     // handle Error
>   }
>   // Fetch was successful, extract datatable
>   var data = response.getDataTable();
>
>   // Define the controls you need
>   var slider = new google.visualization.ControlWrapper({
>     // ...
>   });
>
>   var barChart = new google.visualization.ChartWrapper({
>     // ...
>   }
>
>   // Define the dashboard and give it the data you retrieved from the
> spreadsheet.
>   new google.visualization.Dashboard(document.getElementById('dashboard')).
>     bind(slider, barChart).
>     draw(data);
> }
>
> As you see, you specify your spreadsheet url only once, fetch the data from
> it via Query and then proceed as in the simple dashboard 
> example<http://code.google.com/apis/ajax/playground/?type=visualization#simple_dashboard>in
>  assembling the dashboard.
>
> /R.
>
> --
> 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/-/abjY_rL-cScJ.
>
> 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.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization 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-visualization-api?hl=en.

Reply via email to