Simple Time Query is not working - I wonder why!

34 views
Skip to first unread message

far m

unread,
Jun 1, 2012, 1:24:22 AM6/1/12
to google-visua...@googlegroups.com
Here is the code: http://jsfiddle.net/essonoma/DDrpn/
It is very simple! Note that my time column is in M with the following format: 5/18/2012 14:25:00
THanks for your help.

asgallant

unread,
Jun 1, 2012, 9:51:08 AM6/1/12
to google-visua...@googlegroups.com
Two things:

1) You need to change the callback from drawVisualization to drawChart (or change the drawChart function's name to drawVisualization).
2) You need to capitalize the "L" in AnnotatedTimeLine when creating the chart:

var chart new google.visualization.AnnotatedTimeLine(document.getElementById('chart_div')); 

See fix: http://jsfiddle.net/asgallant/DDrpn/4/

far m

unread,
Jun 2, 2012, 3:48:51 AM6/2/12
to google-visua...@googlegroups.com
Thank you so much! This is perfect. How can I add "legent" to the ATL? Also, when do we have to have a header in our spreadsheet? Which part of the code searches for the header in the spreadsheet? Sometimes, the plot does not show up if the header is not labeled properly. 

Thanks again. 

far m

unread,
Jun 6, 2012, 2:04:13 PM6/6/12
to google-visua...@googlegroups.com
What if I like to do query on columns M, B, C.
Then, I like to plot M and B on one chart and M and C on another
I am duplicating the function calls and variables, but only the last one shows up. What happens to the firs chart?
Thanks


On Friday, June 1, 2012 6:51:08 AM UTC-7, asgallant wrote:

asgallant

unread,
Jun 7, 2012, 9:39:28 AM6/7/12
to google-visua...@googlegroups.com
It's hard to know without seeing the code (there are a handful of things that are likely to be the problem, its just a matter of which ones affect you).  There is a much simpler way to accomplish this, though, than duplicating the code: use DataViews to filter the data you feed each chart.  Something like this: http://jsfiddle.net/DDrpn/5/
Reply all
Reply to author
Forward
0 new messages