Google Charts Timeline driven by Google Sheet Example?

275 views
Skip to first unread message

Alan Hill

unread,
Jul 13, 2017, 11:32:39 AM7/13/17
to Google Visualization API
Hi all,

Can anybody show me a working example of a timeline driven by a Google Sheet? 


Sorry, it's just that I'm having a hard time reverse engineering a PoC from the docs available. Many thanks to anyone who can assist!

Thanks,

Alan


Ray Thomas

unread,
Jul 13, 2017, 12:45:23 PM7/13/17
to Google Visualization API
Here's an example based on the Presidents example in the docs - https://jsfiddle.net/brisray/j8nfu9a2/


All you need do is create a query, send it, handle any error messages (which is all done by the visualization), populate the datatable, create the visualization and draw it.

The format of the date columns must be set as a automatic, number or date else the timeline will not draw.

Ray
 

Alan Hill

unread,
Jul 13, 2017, 1:30:11 PM7/13/17
to google-visua...@googlegroups.com
That's absolutely brilliant - thank you so much, this is super useful!

--
You received this message because you are subscribed to a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/VVuHb0_6UZo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
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/9338c33e-f37f-4a1d-b486-e3e71f4c20f1%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Alice Köstinger

unread,
Jul 14, 2017, 12:03:26 PM7/14/17
to Google Visualization API
Hi Ray,

I was looking for the same problem as Alan today. In my case additional information is needed, e.g. a tooltip for each entry. In my hard coded version I created an additional column with dataTable.addColumn(), but I don't know how to add it via the google spreadsheet, since only 3 columns are possible.

Can you help me in this case?

Many thanks,
Alice

Benjamin Hill

unread,
Jul 15, 2017, 2:03:34 AM7/15/17
to Google Visualization API
Reply all
Reply to author
Forward
0 new messages