How do I save/export an SVG file after creating an SVG with D3.js (IE, safari and chrome)?

后端 未结 6 1029
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-28 19:50

I currently have a website using D3 and I\'d like the user to have the option to save the SVG as an SVG file. I\'m using crowbar.js to do this, but it only works on chrome.

6条回答
  •  误落风尘
    2020-11-28 20:13

    While this question has been answered, I created a small library called SaveSVG which can help save D3.js generated SVG which use external stylesheets or external definition files (using and def) tags.

提交回复
热议问题