Export SVG from DOM to file

I am using d3.js to create a chart that I want any export in vector format for editing in illustrator. Is it possible? This is the code snippet that is generated:

enter image description here

+6
source share
1 answer

There are more complex methods associated with node.js rendering on the server side, but a quick and easy way is to simply copy the svg element from the DOM, paste it into a file, and save it with the .svg extension

After that you can open it in the vector editor.

+9
source

Source: https://habr.com/ru/post/906674/


All Articles