That is an Apps Script environment, not javascript (Apps Script is based on 
javascript, but they are not completely compatible).  You will need to 
consult the Visualization API Apps Script 
Documentation<https://developers.google.com/apps-script/reference/charts/>for 
instructions on proceeding with this.

On Friday, October 25, 2013 1:44:16 AM UTC-4, Shuvashish Chatterjee wrote:
>
> I tried that, however i still continue to get the same error .. 
> Script<https://script.google.com/d/1K1Cn6Qku1cbVF8Qd-tkA-4SLJC0dmRyau-nfp8k6y6cTxIs3cJk33jJf/edit?usp=drive_web>
>
> On Thursday, October 24, 2013 7:42:17 PM UTC+5:30, asgallant wrote:
>>
>> You are missing the Google jsapi script tag:
>>
>> <script type="text/javascript" src="//www.google.com/jsapi"></script>
>>
>>
>>
>> On Thursday, October 24, 2013 2:38:24 AM UTC-4, Shuvashish Chatterjee 
>> wrote:
>>>
>>> Thanks for responding.
>>> I am quite a new to scripts, whwen i publish it as a web app  / run the 
>>> code i get an error : ReferenceError: "google" is not defined. 
>>> The spreadsheet link is 
>>> https://docs.google.com/spreadsheet/ccc?key=0AvLT-nrDD-z7dHJwWkJwSFZTNGZzRVpTY1JVRzRtVUE&usp=sharing
>>>
>>> rgds
>>>
>>> On Thursday, October 24, 2013 10:33:25 AM UTC+5:30, asgallant wrote:
>>>>
>>>> What is the problem you are having?  Glancing over your code, it looks 
>>>> OK, but I can't test it because your spreadsheet isn't published.
>>>>
>>>> On Thursday, October 24, 2013 12:18:19 AM UTC-4, Shuvashish Chatterjee 
>>>> wrote:
>>>>>
>>>>> Dear All
>>>>>
>>>>> I am looking for assitance to set up a dashboard with controls which 
>>>>> will take in data from a URL.  It will be great if you can point me to an 
>>>>> example. 
>>>>> Thank you in Advance.
>>>>> rgds
>>>>>
>>>>> The specific code in my case is : 
>>>>>
>>>>> function drawVisualization () {
>>>>>     var query = new google.visualization.Query('
>>>>> http://spreadsheets.google.com/tq?key=0AvLT-nrDD-z7dHJwWkJwSFZTNGZzRVpTY1JVRzRtVUE&pub=1'
>>>>> );
>>>>>     
>>>>>     query.setQuery('SELECT A, B, C, D ,E, F ');
>>>>>     
>>>>>     query.send(function (response) {        
>>>>>         if (response.isError()) {
>>>>>             alert('Error in query: ' + response.getMessage() + ' ' + 
>>>>> response.getDetailedMessage());
>>>>>             return;
>>>>>         }
>>>>>         var data = response.getDataTable();
>>>>>       
>>>>>       var regionFilter = new google.visualization.ControlWrapper({
>>>>>     'controlType': 'CategoryFilter',
>>>>>     'containerId': 'control1',
>>>>>     'options': {
>>>>>       'filterColumnLabel': 'Region',
>>>>>       'ui': {
>>>>>         'allowTyping': false,
>>>>>         'allowMultiple': false,
>>>>>         'selectedValuesLayout': 'belowStacked'
>>>>>       }
>>>>>     },
>>>>>     // Define an initial state, i.e. a set of metrics to be initially 
>>>>> selected.
>>>>>     'state': {'selectedValues': ['India']}
>>>>>   });
>>>>>
>>>>>     var yearFilter = new google.visualization.ControlWrapper({
>>>>>     'controlType': 'CategoryFilter',
>>>>>     'containerId': 'control2',
>>>>>     'options': {
>>>>>       'filterColumnLabel': 'Year',
>>>>>       'ui': {
>>>>>         'allowTyping': false,
>>>>>         'allowMultiple': false,
>>>>>         'selectedValuesLayout': 'belowStacked'
>>>>>       }
>>>>>     },
>>>>>     // Define an initial state, i.e. a set of metrics to be initially 
>>>>> selected.
>>>>>     'state': {'selectedValues': ['2011']}
>>>>>   });  
>>>>>       
>>>>>    var barChart = new google.visualization.ChartWrapper({
>>>>>     'chartType': 'ColumnChart',
>>>>>     'containerId': 'chart1',
>>>>>     'options': {
>>>>>       'width': 400,
>>>>>       'height': 180
>>>>>     },
>>>>>     'view': {'columns': [3,4]}
>>>>>   });
>>>>>        
>>>>>   // Create the dashboard.
>>>>>   var dashboard = new 
>>>>> google.visualization.Dashboard(document.getElementById('dashboard')).
>>>>>     // Configure the category picker to affect the gauge chart
>>>>>     bind(regionFilter, barChart).
>>>>>     // Draw the dashboard
>>>>>     draw(data);
>>>>>       });
>>>>> } 
>>>>>
>>>>>

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to