Thank you both for the fix and debugging tips. Adam
On Thursday, January 8, 2015 at 12:12:12 PM UTC-6, Adam Laybourn wrote: > > I am trying to query a google sheet to populate a column chart, but keep > getting the error '*All series on a given axis must be of the same data > type'*. > > Here's my sheet: > > https://docs.google.com/spreadsheets/d/1zIABnJ54bk7COAtVXJDMidHX5dc-OBbmDKcxEVanITg/edit#gid=0 > > I copied the date from a google example: > > https://docs.google.com/spreadsheet/ccc?key=0Atw2BTU52lOCdEZpUlVIdmxGOWZBR2tuLXhYN2dQTWc&usp=drive_web&gid=0# > > If I link to the example sheet in the html below everything works fine. I > can't figure out why I can't link to my sheet, which seems identical. > > and here's my html: > > <html> > <head> > <script type="text/javascript" src="https://www.google.com/jsapi > "></script> > <script type="text/javascript"> > google.load("visualization", '1', {packages:['corechart']}); > google.setOnLoadCallback(drawChart); > function drawChart() { > var query = new google.visualization.Query( > ' > https://docs.google.com/spreadsheets/d/1zIABnJ54bk7COAtVXJDMidHX5dc-OBbmDKcxEVanITg/edit#gid=0' > ); > query.send(handleQueryResponse); > } > > function handleQueryResponse(response) { > if (response.isError()) { > alert('Error in query: ' + response.getMessage() + ' ' + > response.getDetailedMessage()); > return; > } > > var data = response.getDataTable(); > var chart = new > google.visualization.ColumnChart(document.getElementById('columnchart')); > chart.draw(data, { legend: { position: 'none' } }); > } > </script> > > <title>Test chart</title> > </head> > > <body> > <span id='columnchart'></span> > </body> > </html> > > Thanks for the any help, > Adam > -- 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.
