export to csv google visualization

158 views
Skip to first unread message

Neri Martinez

unread,
Dec 10, 2012, 10:21:08 AM12/10/12
to google-visua...@googlegroups.com
I have some charts with google visualization

i saw an answer to export to csv, but uses an url. Am using grails and charts dataset are provided by code, not by url.

how can i export to csv the data without using and url? just export datatable data.

Thanks!

asgallant

unread,
Dec 10, 2012, 10:34:31 AM12/10/12
to google-visua...@googlegroups.com
There are two ways to do this:

1) if you are getting data from a server, modify the data source to provide a CSV of the data on demand (in addition to providing the data in the way you usually get it).
2) if that is not feasible, you can use this hack I wrote to accomplish something similar: http://jsfiddle.net/asgallant/MqERY/3/ (the relevant code is down at the bottom, in the "ready" event handler).  The hack isn't perfect, but it does work.
Reply all
Reply to author
Forward
0 new messages