Built with blockbuilder.org
forked from zeffii's block: stage fright
Built with blockbuilder.org
forked from zeffii's block: stage fright
svg = d3.select("svg") | |
circle = svg.selectAll("circle") | |
.data([32, 57, 93], (d) -> d ) | |
circle.enter().append("circle") | |
.attr("cy", 60) | |
.attr("cx", (d, i) -> (i * 10 + 30) ) | |
.attr("r", (d) -> Math.sqrt(d) ) | |
circle.exit().remove() |
<!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> | |
<script type="text/coffeescript" src='frump.coffee'></script> | |
<style> | |
svg { height:300; width: 600} | |
</style> | |
</head> | |
<body> | |
<svg></svg> | |
</body> |