Skip to content

Instantly share code, notes, and snippets.

@englishm
Created October 26, 2012 16:54
Show Gist options
  • Save englishm/3959883 to your computer and use it in GitHub Desktop.
Save englishm/3959883 to your computer and use it in GitHub Desktop.
just another inlet to tributary
{"endpoint":"","display":"svg","public":true,"require":[],"tab":"edit","display_percent":0.7,"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 w = 500;
var h = 500;
var dataset = [10, 15, 20, 25, 30];
var svg = d3.select("svg")
.attr("width", w)
.attr("height", h);
svg.data(dataset)
.enter()
.append("circle")
var circles = d3.selectAll("circle")
.data(dataset)
.enter()
.append("circle");
circles.attr("cx", function(d, i){
return (i * 50) + 25;
})
.attr("cy", h/2)
.attr("r", function(d,i){
return d;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment