Skip to content

Instantly share code, notes, and snippets.

@bharatbhole
Created January 14, 2012 16:48
Show Gist options
  • Save bharatbhole/1612001 to your computer and use it in GitHub Desktop.
Save bharatbhole/1612001 to your computer and use it in GitHub Desktop.
<div id="svgpathSVGdata"></div>
<script type="text/javascript">
var divElem = d3.select("#svgpathSVGdata");
var svgcanvas = divElem.append("svg:svg")
.attr("width", 200)
.attr("height", 200);
// (1) Specifying path data the SVG way
svgcanvas.append("svg:path")
.attr("d","M 0 60 L 50 110 L 90 70 L 140 100")
.style("stroke-width", 2)
.style("stroke", "steelblue")
.style("fill", "none");
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment