Skip to content

Instantly share code, notes, and snippets.

@lostinplace
Created May 18, 2013 20:23
Show Gist options
  • Save lostinplace/5605667 to your computer and use it in GitHub Desktop.
Save lostinplace/5605667 to your computer and use it in GitHub Desktop.
test
{"editor_editor":{"coffee":false,"vim":false,"emacs":false,"width":600,"height":300,"hide":false},"description":"test","endpoint":"","display":"svg","public":true,"require":[],"fileconfigs":{"_.md":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"default":true,"vim":false,"emacs":false,"fontSize":12},"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"inlet.svg":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"fullscreen":false,"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"period","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01}
var circleData =[15,35, 55, 150];
var svgContainer = d3.select("body").append("svg")
.attr("width",500)
.attr("height",500);
var circles = svgContainer.selectAll("g")
.data(circleData)
.enter()
.append("g");
// Add outer circle.
circles.append("circle")
.attr("cx", function (d) { return d; })
.attr("cy", function (d) { return d; })
.attr("r", function (d) { return d; })
.style("fill", "red");
// Add inner circle.
circles.append("circle")
.attr("cx", function (d) { return d; })
.attr("cy", function (d) { return d; })
.attr("r", function (d) { return d; })
.style("fill", "yellow");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment