Hi, I found 2 issues:
- you define the 'slider' and 'table' objects as local variables in the 
drawVisualization() method, but you reference them in handleQueryResponse() 
(likely causing an 'undefined variable' error)
- the slider you define operates on a column which doesn't exist in your 
datasource ('Level' column, as specified by the filterColumnLabel option. I 
replaced it with 'Population Density').

I updated the code to look like this (I tried it in the playground and works 
for me):

function drawVisualization() {
  // Prepare the data
  var query = new google.visualization.Query(
'http://spreadsheets.google.com/ccc?key=pCQbetd-CptGXxxQIG7VFIQ&pub=1'); 
  query.send(handleQueryResponse); 
}

function handleQueryResponse(response) {
   if (response.isError()) { 
     alert('Error in query: ' + response.getMessage() + ' ' +  response.
getDetailedMessage()); 
     return; 
   } 
  
   var slider = new google.visualization.ControlWrapper({ 
     'controlType': 'NumberRangeFilter', 
     'containerId': 'control1', 
     'options': { 
       'filterColumnLabel': 'Population Density', 
       'ui': {'labelStacking': 'vertical'} 
     } 
   }); 

   // Define a table 
   var table = new google.visualization.ChartWrapper({ 
     'chartType': 'Table', 
     'containerId': 'chart2', 
     'options': { 
       'width': '500px' 
     } 
   }); 
  
  var data = response.getDataTable(); 
  new  google.visualization.Dashboard(document.getElementById('dashboard')).
bind(
    [slider], [table]).draw(data);
}
​

-- 
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