Create an export CSV with a Table Chart

30 views
Skip to first unread message

Yoann Eon

unread,
Jan 16, 2017, 10:39:21 AM1/16/17
to Google Visualization API
Hello,

so my problem is I created a table chart with this code below :

var jsonData = $.ajax({
          url: "MyURL",
          dataType: "json",
          async: false
          }).responseText;

      // Create our data table out of JSON data loaded from server.
      var data = new google.visualization.DataTable(jsonData);

      var table = new google.visualization.Table(document.getElementById('table_div'));

      table.draw(data, {showRowNumber: true, width: '100%', height: '100%'});


And now I want to create an export csv, so I followed the Google Docs with this : 

{type: 'csv', datasource: 'MyUrl'}

But this only create a new page with the JSON I give hime with my URL and not the CSV.

I don't know if i'm really clear, if you have a question, let me know :)

Yoann

Reply all
Reply to author
Forward
0 new messages