As most of what you need is in your index.html file anyway it may be an 
idea to remove the GS code altogether, or at least the getSpreadsheetData() 
function and use the API's query to connect to and get the data from the 
spreadsheet. There's a complete example at 
https://developers.google.com/chart/interactive/docs/spreadsheets

All you need is your Sheet ID, GID or sheet name and the columns you want 
to import and change the chart type from ColumnChart to LineChart. The API 
is good at importing the data it can find so you may not even need the 
querystring part. In the example 
use 
'https://docs.google.com/spreadsheets/d/1XWJLkAwch5GXAt_7zOFDcg8Wm8Xv29_8PWuuW15qmAE/gviz/tq?gid=0&headers=1';
 
instead 
of 
'https://docs.google.com/spreadsheets/d/1XWJLkAwch5GXAt_7zOFDcg8Wm8Xv29_8PWuuW15qmAE/gviz/tq?gid=0&headers=1&tq='
 
+ queryString); 

This won't work in the example, but could for your sheet. You'll see why if 
you look at the example's sheet at 
https://docs.google.com/spreadsheets/d/1XWJLkAwch5GXAt_7zOFDcg8Wm8Xv29_8PWuuW15qmAE/edit#gid=0


Also in your code you have <div id="main"></div> The empty div is to hold 
the chart, so you need to change it to <div id="curve_chart"></div> which 
is what you've used later on in your code.

I hope all that makes sense, standard charts are fairly easy to produce 
once you get the hang of what's happening.

-- 
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 https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/29317085-5561-4ebf-8a01-45317ee25f9e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to