Skip to content

Instantly share code, notes, and snippets.

@quizzicol
Created June 21, 2014 08:34
Show Gist options
  • Save quizzicol/87d8da6c2f0e6544d67b to your computer and use it in GitHub Desktop.
Save quizzicol/87d8da6c2f0e6544d67b to your computer and use it in GitHub Desktop.
<!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>
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