For debugging purposes, it is a good idea to make sure you are getting the data you think you should be getting from the spreadsheet, by replacing ColumnChart with just Table (and also load the package 'table').
On Thu, Jan 8, 2015 at 1:28 PM, 'Sergey Grabkovsky' via Google Visualization API <[email protected]> wrote: > It looks like Sheets is returning more columns than you expected. you can > use query.setQuery('SELECT A, B') to just limit it to the first 2 columns. > Here is an example: http://jsfiddle.net/qgsxhqqa/ > > > On Thu Jan 08 2015 at 1:19:14 PM Adam Laybourn <[email protected]> > wrote: > >> Sorry I forgot to share the link: >> >> >> https://docs.google.com/spreadsheets/d/1zIABnJ54bk7COAtVXJDMidHX5dc-OBbmDKcxEVanITg/edit?usp=sharing >> >> >> On Thursday, January 8, 2015 at 12:17:35 PM UTC-6, Sergey wrote: >> >>> Hi, >>> >>> It looks like you didn't share your sheet. Please do so, so that we may >>> look at it to see what is going wrong. >>> >>> On Thu Jan 08 2015 at 1:12:14 PM Adam Laybourn <[email protected]> >>> 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. >>>> >>> -- >> 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. >> > -- > 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. > -- Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2> - 978-394-1058 [email protected] <[email protected]> 5CC, Cambridge MA [email protected] <[email protected]> 9 Juniper Ridge Road, Acton MA -- 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.
