Skip to content

Instantly share code, notes, and snippets.

@zacker330
Created March 14, 2013 05:12
Show Gist options
  • Save zacker330/5158984 to your computer and use it in GitHub Desktop.
Save zacker330/5158984 to your computer and use it in GitHub Desktop.
d3.js get start
<!DOCTYPE html>
<html>
<head>
<title>Hello, data!</title>
<script type="text/javascript" src="lib/d3.js"></script>
</head>
<body>
<div id="viz"></div>
<script type="text/javascript">
var sampleSVG = d3.select("#viz")
.append("svg:svg")
.attr("width", 100)
.attr("height", 100);
sampleSVG.append("svg:circle")
.style("stroke", "black")
.style("fill", "white")
.attr("r", 40)
.attr("cx", 50)
.attr("cy", 50)
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment