CSV Download functionality not working on Firefox

671 views
Skip to first unread message

pritam...@gmail.com

unread,
Jan 31, 2017, 1:21:01 AM1/31/17
to d3plus
I have implemented the download to CSV functionality in my component. It works on Chrome but not on Firefox. It appears to be an issue.

Any help please.

Oleksandr Zastupailo

unread,
Jan 31, 2017, 5:07:52 AM1/31/17
to d3plus, pritam...@gmail.com
It was already mentioned in this topic https://groups.google.com/forum/#!topic/d3plus/k0J5-B1rh8Y

Maybe you can create an issue for it in the repository.
Message has been deleted

ilidio....@gmail.com

unread,
Sep 30, 2017, 8:26:02 PM9/30/17
to d3plus
I just made a small fix:
https://www.dropbox.com/s/wnf6fa51ohbvjhy/d3plus.full.js?
This fix is based in what I read about: «Use JavaScript to Export Your Data as CSV»
@ https://halistechnology.com/2015/05/28/use-javascript-to-export-your-data-as-csv/

The fix only consist's in changing the code, where he tries to download the CSV:

// Line 39570
var blob = new Blob([csv_data], {type: "text/csv;charset=utf-8;"});
var link = document.createElement("a");
if (link.download !== undefined) {
var url = URL.createObjectURL(blob);
link.setAttribute("href", url);
link.setAttribute("download", title + ".csv");
link.style = "visibility:hidden";
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
}
File: d3plus.full.js.zip
(d3plus.v1.9.8 changed)
Reply all
Reply to author
Forward
0 new messages