Created
June 21, 2014 08:31
-
-
Save quizzicol/2120ed0931e2504a927c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="D3 intro #3" /> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<meta charset="utf-8"> | |
<title>Drawing SVG shapes with D3</title> | |
</head> | |
<body> | |
<svg width="50" height ="50"> | |
<circle cx="25" cy="25" r="25" style="fill:blue"/> | |
</svg> | |
</body> | |
</html> |
This file contains hidden or 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
d3.select("body") | |
.append("svg") | |
.attr("width", 50) | |
.attr("height", 50) | |
.append("circle") | |
.attr("cx", 25) | |
.attr("cy", 25) | |
.attr("r", 25) | |
.style("fill", "purple"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment