Just as a note, I erroneously stated in the message that I'm attempting to use a ColumnChart in the beginning of the message. I'm attempting to use a Bar chart, but have tried a ColumnChart earlier.
On Tuesday, June 23, 2015 at 12:46:51 PM UTC-4, Christian Alexander wrote: > Hey Everyone, > > I searched the boards using the subject but failed to find an answer that > worked in my case. > > I'm attempting to make a dashboard containing a CategoryFilter and > a ColumnChart. I am querying a sheets page and pulling Date (a date field), > Direction (string, In or Out), and Two Counts (a number of messages and a > number of signatures). I continue getting the error in the subject handle. > > My Code is as follows : > > <!DOCTYPE html> > <html> > <head> > <meta charset="UTF-8"> > <script type="text/javascript" src=" > https://www.google.com/jsapi"></script> > <script type="text/javascript"> > google.load('visualization', '1.0', {'packages':['controls']}); > google.setOnLoadCallback(queryData); > function queryData(){ > var queryString = encodeURIComponent('SELECT D,E,H,I'); > var query = new google.visualization.Query('sheetURL is here, just > hidden' + queryString); > query.send(handleQueryResponse); > } > function handleQueryResponse(response){ > var data = response.getDataTable(); > var dashboard = new > google.visualization.Dashboard(document.getElementById('dashboard_div')); > var tslDirectionFilter = new google.visualization.ControlWrapper({ > 'controlType': 'CategoryFilter', > 'containerId': 'filter_div', > 'values': ['In','Out'], > 'options':{ > 'filterColumnIndex': 0 > }, > 'state':{ > 'selectedValues': [0] > } > }); > var tslColumnChart = new google.visualization.ChartWrapper({ > 'chartType': 'Bar', > 'contianerId': 'chart_div', > 'view': { > 'columns': [0,1,2,3] > } > }); > var aggregateData = google.visualization.data.group( > data, > [0,1], [{ > type: 'number', > label: 'Messages', > column: 2, > aggregation: google.visualization.data.sum > },{ > type: 'number', > label: 'Packages', > column: 3, > aggregation: google.visualization.data.sum > }]); > dashboard.bind(tslDirectionFilter, tslColumnChart); > dashboard.draw(aggregateData); > } > </script> > </head> > <body> > <div id='dashboard_div'> > <div id='filter_div'></div> > <div id='chart_div'></div> > </div> > </body> > </html> > > Column 0 is the Direction, Column 1 is the Date, Column 2 is the Messages, > and Column 3 is the signatures. Signatures and Messages are usually, but > not always, 1-1, hence why I have both. > > I'm attempting to use the Bar chart here, I'm not sure if this is the > cause of the problem as it also fails to draw if I use a table or > ColumnChart. > > Any help is greatly appreciated! > Thanks & Regards, > > Christian > -- 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/d/optout.
