Skip to content

Instantly share code, notes, and snippets.

@purp
Created July 9, 2012 23:37
Show Gist options
  • Save purp/3079795 to your computer and use it in GitHub Desktop.
Save purp/3079795 to your computer and use it in GitHub Desktop.
purp's d3 sandbox
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Raindrops</title>
<script type="text/javascript" src="https://github.com/mbostock/d3/raw/v1.4.0/d3.js"></script>
</head>
<body>
<script type="text/javascript">
var circle = svg.selectAll("circle")
.data([32, 57, 293], String);
circle.enter().append("circle")
.attr("cy", 90)
.attr("cx", String)
.attr("r", Math.sqrt);
circle.exit().remove(); </script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment