Publish chart error - First column must contain date, or date and time.

549 views
Skip to first unread message

Nikolay Georgiev

unread,
May 20, 2012, 1:00:20 PM5/20/12
to google-visua...@googlegroups.com
I want to publish this data and chart: https://docs.google.com/spreadsheet/pub?key=0Au4HBfGndfFmdDdBc2xETmdSNElHaThFOGlTOVNpaVE&gid=0

but when I embed the Javascript to my website, I receive the red error "First column must contain date, or date and time."

The Javascript code is:
<script type="text
/javascript" src="//ajax.googleapis.com/ajax/static/modules/gviz/1.0/chart.js"> {"dataSourceUrl":"//docs.google.com/spreadsheet/tq?key=0Au4HBfGndfFmdDdBc2xETmdSNElHaThFOGlTOVNpaVE&transpose=0&headers=1&range=B1%3AC11&gid=0&pub=1","options":{"displayAnnotations":true,"vAxes":[{"useFormatFromData":true,"viewWindowMode":"pretty","viewWindow":{}},{"useFormatFromData":true,"viewWindowMode":"pretty","viewWindow":{}}],"booleanRole":"certainty","displayRangeSelector":false,"displayZoomButtons":false,"wmode":"opaque","hAxis":{"useFormatFromData":true},"width":1192,"height":483},"state":{},"chartType":"AnnotatedTimeLine","chartName":"Chart 1"} </script>

Any ideas how to fix that?

Thank you,

Nikolay

ChartMan

unread,
May 20, 2012, 3:48:51 PM5/20/12
to google-visua...@googlegroups.com
This works for me ...


--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-visualization-api/-/oI0qTuAMM78J.
To post to this group, send email to google-visua...@googlegroups.com.
To unsubscribe from this group, send email to google-visualizati...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.

Nikolay Georgiev

unread,
May 20, 2012, 3:53:28 PM5/20/12
to google-visua...@googlegroups.com
yes, it works also here http://www.w3schools.com/js/tryit.asp?filename=tryjs_dom

but not in a Wiki or a Wordpress post:
http://opensourceecology.org/wiki/Google_Chart_Test

Nikolay
--
Nikolay Georgiev
osede.org - Open Source Ecology Germany | Contacts: http://opensourceecology.org/wiki/Nikolay_Georgiev

ChartMan

unread,
May 21, 2012, 4:31:42 AM5/21/12
to google-visua...@googlegroups.com
It seems that the platform is escaping the DataSourceUrl making it invalid 
https://docs.google.com/spreadsheet/tq?key=0Au4HBfGndfFmdDdBc2xETmdSNElHaThFOGlTOVNpaVE&amp;transpose=0&amp;headers=1&amp;range=B1%3AC11&amp;gid=0&amp;pub=1&tqx=reqId%3A0

Try un-escaping the "&amp;" to &
Reply all
Reply to author
Forward
0 new messages