3 ms·
Use the Node.JS package on the server, then convert the SVG to PNG. https://www.npmjs.com/package/d3 https://www.npmjs.com/package/d3 One minor caution is to
by neurotech1 10y ago
Use the Node.JS package on the server, then convert the SVG to PNG.
https://www.npmjs.com/package/d3 https://www.npmjs.com/package/d3
One minor caution is to avoid using CSS to style the SVG, because won't convert to PNG properly.
Use ImageMagick or the svg2png (PhantomJS based) package to convert.
https://www.npmjs.com/package/imagemagick-native https://www.npmjs.com/package/imagemagick-native
https://www.npmjs.com/package/svg2png https://www.npmjs.com/package/svg2png