live google charts +export to csv functionality

1,455 views
Skip to first unread message

shub

unread,
Jun 5, 2012, 7:18:39 AM6/5/12
to google-visua...@googlegroups.com
Hi,


     I have implemented google charts with live data coming from the server. Now I have to add a functionality to export the data into CSV file. I am able to get the dropdown select box with Export to cs, but am not sure what to pass into the dataSource url.

function drawToolbar() {
var jsonData1 = $.ajax({
url: "myphpurl.php'",
dataType:"json",
async: false,
}).responseText;

var components = [
          {type: 'csv', datasource:  '????'}
      ];
 var container = document.getElementById('toolbar_div');
      google.visualization.drawToolbar(container, components);
    }

I tried with the json responce but its not working ...

Can anyone please help me to solve this issue....

Thanks in advance.








Wesley Chin

unread,
Jul 16, 2012, 4:24:25 AM7/16/12
to google-visua...@googlegroups.com
Hi there,

I am also stuck with exactly the same problem, can anyone help please?

Regards,
Wesley

Jérôme

unread,
Jul 16, 2012, 6:00:57 AM7/16/12
to google-visua...@googlegroups.com
Afaik, the toolbar with csv export only works with data coming from google spreadsheets, but it is planned to have a local data export with the next API release

ChartMan

unread,
Jul 16, 2012, 6:50:37 AM7/16/12
to google-visua...@googlegroups.com

The data source protocol supports CSV as an output format

https://developers.google.com/chart/interactive/docs/dev/implementing_data_source#requestformat

--
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/-/70gs7FY7E08J.
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.
Reply all
Reply to author
Forward
0 new messages