Hi Paul,

If you're using the "New Sheets", then you have to use a different URL than
the one you're currently using. Your URL should look something like this:
https://docs.google.com/spreadsheets/d/{SPREADSHEET_KEY_GOES_HERE}/edit or
like this:
https://docs.google.com/spreadsheets/d/{SPREADSHEET_KEY_GOES_HERE}/gviz/tq
<https://docs.google.com/spreadsheets/d/%7BSPREADSHEET_KEY_GOES_HERE%7D/edit>
.

As Dan said, please ensure that your spreadsheet is shared publicly,
otherwise nobody will be able to access the spreadsheet except you (unless
the spreadsheet is shared with them and they're logged in to Google).

On Wed, Sep 16, 2015 at 8:53 AM 'Daniel LaLiberte' via Google Visualization
API <google-visualization-api@googlegroups.com> wrote:

> Paul,
>
> I'd suggest you first try to create a chart that accesses data from a
> spreadsheet without trying to use the chartwrapper (and charteditor).
>  See https://developers.google.com/chart/interactive/docs/spreadsheets
> for the docs on that.   Also try with a simpler query.
>
> Make sure your spreadsheet is publicly accessible or that you have already
> logged in, since the google charts code will not be able to prompt you for
> login credentials.
>
>
> On Mon, Sep 14, 2015 at 7:36 PM, Paul Schwartz <p...@ksikeyboards.com>
> wrote:
>
>> I am trying to understand the ChartWrapper and ChartEditor objects and I
>> am failing.
>>
>> Let me explain my problem. I cut and paste the example on the website
>> (below) to an html  file on my on server. I access it and everything is
>> fine. Then I access the datasourceURL  (
>>
>> http://spreadsheets.google.com/tq?key=pCQbetd-CptGXxxQIG7VFIQ&pub=1) and 
>> copy the returned text to another file on my server.
>> Then I use that data file for the datasource url and it doesn't load the 
>> file.
>>
>> Is there some magic I need to do in the data source URL to get it to work? 
>> Also, I noticed there is a property called "sig", what is that?
>>
>> I am very confused.
>>
>> Thanks in advance
>>
>> Paul
>>
>>
>>
>> <!DOCTYPE html>
>> <html>
>> <head>
>> <meta http-equiv='content-type' content='text/html; charset=utf-8'/>
>> <title>Google Visualization API Sample</title>
>> <!-- One script tag loads all the required libraries! Do not specify any 
>> chart types in
>>   the autoload statement.
>> -->
>> <script type="text/javascript"
>>     src='https://www.google.com/jsapi?autoload={
>>       "modules":[{
>>         "name":"visualization",
>>         "version":"1"
>>       }]
>>     }'></script>
>> <script type="text/javascript">
>>   google.setOnLoadCallback(drawVisualization);
>>   function drawVisualization() {
>>     // Define the chart using setters:
>>     var wrap = new google.visualization.ChartWrapper();
>>     wrap.setChartType('LineChart');
>>     
>> wrap.setDataSourceUrl('http://spreadsheets.google.com/tq?key=pCQbetd-CptGXxxQIG7VFIQ&pub=1');
>>     wrap.setContainerId('visualization');
>>     wrap.setQuery('SELECT A,D WHERE D > 100 ORDER BY D');
>>     wrap.setOptions({'title':'Population Density (people/km^2)', 
>> 'legend':'none'});
>>     wrap.draw();
>>   }
>> </script>
>> </head>
>> <body>
>>   <div id='visualization' style='height: 400px; width: 400px;'></div>
>> </body>
>> </html>
>>
>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> To post to this group, send email to
>> google-visualization-api@googlegroups.com.
>> Visit this group at
>> http://groups.google.com/group/google-visualization-api.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/google-visualization-api/309ea801-9dbe-43c4-a259-d0204c014587%40googlegroups.com
>> <https://groups.google.com/d/msgid/google-visualization-api/309ea801-9dbe-43c4-a259-d0204c014587%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2>
>  - 978-394-1058
> dlalibe...@google.com <dlalibe...@google.com>   5CC, Cambridge MA
> daniel.lalibe...@gmail.com <daniel.lalibe...@gmail.com> 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 google-visualization-api+unsubscr...@googlegroups.com.
> To post to this group, send email to
> google-visualization-api@googlegroups.com.
> Visit this group at
> http://groups.google.com/group/google-visualization-api.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJNcm%3DyRZ7mx5mG9gPadrCuZ3%3DaAniH_gQsngrPR%2BqcUhQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJNcm%3DyRZ7mx5mG9gPadrCuZ3%3DaAniH_gQsngrPR%2BqcUhQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> 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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/CAEwwup6NJVz4ppJKu_FYK%3D%2BYF5ErdOgR1enB2WCBgi_-8PALPg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to