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
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