Skip to content Skip to sidebar Skip to footer

Google Charts + Google Sheets: Specified Range Does Not Identify Data Correctly

I settled on using Google Charts to draw the data from an auto-updating Google Sheet that draws from my Analytics account (the analytic API wasn't working out). I've done quite a l

Solution 1:

The issue here was just my foggy brain - I took a break and came back to it yesterday to discover a couple issues:

wrap.setDataSourceUrl('https://docs.google.com/spreadsheets/d/1jICOBDvZzRxEThcWqnpFmNLUqjVP81Zd9RTwpbG29cE/gviz/tq?sheet=Sheet2&range=Keywords-All_Time!B11:C12&headers=1&tq=');
  1. My URL specifies the sheet twice. I recall someone telling me to format the range with the sheet, but I suppose I never erased the other parameter.

  2. My table had the axes the wrong way around. I reversed them and found everything worked well from there.

I abandoned the chart wrapper and decided to move on to that when I actually have a need for it. Here's the current jsfiddle with the code I'm working on now: https://jsfiddle.net/c11c9a0w/19/

This will be extremely helpful for anyone having trouble building a dynamic dashboard from a Google Sheet that has multiple graphs on a single page, so feel free to work off of this.

-Joel

Post a Comment for "Google Charts + Google Sheets: Specified Range Does Not Identify Data Correctly"