block by armollica f5c6386bfe9fc6769fbb23b14d21aeb3

Convert SVG to Image

Full Screen

Convert SVG to an image on-the-fly.

This article from MDN explains the process of rendering a DOM object on a canvas element: Drawing DOM object into a canvas. Rendering to an <img> element is very similar. This works for any DOM object, not just SVG. Not sure if this is well supported by older browsers. Works on Chrome, Firefox and IE 10 for me. The bar chart is a fork of this block by Mike Bostock: Canvas Bar Chart.

index.html

data.tsv