Skip to content

Instantly share code, notes, and snippets.

@tmcw
Created October 8, 2013 14:16
Show Gist options
  • Save tmcw/6885397 to your computer and use it in GitHub Desktop.
Save tmcw/6885397 to your computer and use it in GitHub Desktop.
Tributary inlet
{"description":"Tributary inlet","endpoint":"","display":"svg","public":true,"require":[],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"stroke.css":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"fullscreen":false,"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"pingpong","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"thumbnail":"http://i.imgur.com/9NpCQdi.png"}
var svg = d3.select('svg');
svg.selectAll('circle')
.data(d3.range(0, 10))
.enter()
.append('circle')
.attr('r', 10)
.attr('transform', function(d) {
return 'translate(' + d*25 + ', 200)';
})
.classed('stroke', function(d) {
return d > 4;
});
.stroke {
stroke:red;
stroke-width:2;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment