svg-exportJS

An easy-to-use client-side library to export svg charts from the DOM and download them as an SVG file, PDF, or raster image (JPEG, PNG) format.

Github repo: https://github.com/sharonchoong/svg-exportJS

Demo

Testing 123 Subtitle

Note: for the "PNG (svg string)" export, the red circle does not render as red because the serialized string does not contain the "color: red" style for "currentColor", which is actually found on the SVG's container

Note: for the "SVG (filtered)" export, circles and the "Subtitle" text with "font-size: 10" are filtered out