I dynamically generate a Dygraph chart with data retrieved and formatted using a PHP script.
var vGraph = new Dygraph(document.getElementById("dgraphChartContainer"),
"./data_packager.php",
{ //options
...
};
My customer wants me to add a button on the Dygraph to download a CSV file of the complete raw data set returned by the PHP query. Is there a single Dygraph object I can reference of the entire RxC matrix? If not, is there a simpler or more efficient way to recreate the CSV than to perform a .getValue on each element in the data set and then export to a new CSV file per one of the solutions in How to export JavaScript array info to csv (on client side)??
Aucun commentaire:
Enregistrer un commentaire