Created
January 14, 2012 16:48
-
-
Save bharatbhole/1612001 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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