SVG Drawing https://developer.mozilla.org/en/docs/Web/SVG/Element/textPath http://stackoverflow.com/questions/24045673/reorder-elements-of-svg-z-index-in-d3-js SVG Drawing https://developer.mozilla.org/en-US/docs/Web/API/XMLSerializer http://stackoverflow.com/questions/2897619/using-html5-javascript-to-generate-and-save-a-file http://stackoverflow.com/questions/27098373/saving-xml-filen-in-node-js Save SVG Example var s = new XMLSerializer(); content=s.serializeToString(svg); uriContent = "data:application/octet-stream," + encodeURIComponent(content); //newWindow = window.open(uriContent, 'dijkstra-svg'); location.href = uriContent