--
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 google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.
Hi Andrew,Your response handler should check for errors. See the isError() and getMessage() methods on: https://developers.google.com/chart/interactive/docs/reference#QueryWhen there is an error, the data table will be null.The permission problem is that, if you are not logged in, Google Charts can't offer you a login dialog in order to get access to the spreadsheet.As for how to indicate that the first row of the sheet will be used as a header, there is no way currently, at least not on the Google Charts side. Perhaps if you specify the format of the first row in your spreadsheet as text, and format the columns otherwise as numbers, the spreadsheet would have enough info to decide that your first row should be treated specially.Another approach is to first get all the data, including your header row, and then pull it apart in your query response handler, and construct a DataView from all but the first row, and define the columns based on your header row. See https://developers.google.com/chart/interactive/docs/reference#DataView and the setRows() and setColumns() methods.Hope that helps give you some clues about how to proceed.
On Wed, Dec 17, 2014 at 10:02 AM, Andrew Castellano <awcast...@gmail.com> wrote:
Sorry guys, realizing that this fiddle won't work for anyone but me... I guess that's my new problem. Does anyone knows why it would say "dataTable is not defined" for everyone but me? Since I'm the only one that can see it, and the data is being pulled from a Google Sheet, would it have to do with user permission to that sheet? Even though I published it?
On Tuesday, December 16, 2014 2:26:17 PM UTC-5, Andrew Castellano wrote:js fiddle: http://jsfiddle.net/awcastellano/a1qbju32/9/The headers in the Google Sheet are: Team/QA/DSWhen queried and sent to the Table they are inserted as plain cell data (understandable since I didn't indicate the first row is a header). The question is, how do I indicate the first row of the Sheet be used as a header in the Table?I promise I looked around, I couldn't find anything and kept going in circles.
--
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 google-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.