Created
June 21, 2014 08:34
-
-
Save quizzicol/87d8da6c2f0e6544d67b 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</title> | |
</head> | |
<body> | |
<Svg width="250" height=50> | |
<text x="0" y="25">Easy Peasy</text> | |
</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", 250) | |
.attr("height", 50) | |
.append("text") | |
.text("Hello world") | |
.attr("y", 25) | |
.attr("x", 0) | |
.style("fill", "blue") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment