Skip to content

Instantly share code, notes, and snippets.

@zeffii
Last active October 21, 2015 07:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zeffii/95800d30829ab8ab4ba6 to your computer and use it in GitHub Desktop.
Save zeffii/95800d30829ab8ab4ba6 to your computer and use it in GitHub Desktop.
stage fright
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script>
<script src="http://coffeescript.org/extras/coffee-script.js"></script>
<style>
</style>
</head>
<body>
<script type="text/coffeescript">
svg = d3.select("body").append("svg")
circle = svg.selectAll("circle")
.data([32, 57, 293], (d) -> d )
circle.enter().append("circle")
.attr("cy", 60)
.attr("cx", (d, i) -> (i * 100 + 30) )
.attr("r", (d) -> Math.sqrt(d) )
circle.exit().remove()
</script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment