2 ms·
That's a neat article, with a number of good examples. In the sorting example, I don't think you need either of your `each`s. Almost every D3 method operates
by couchand 13y ago
That's a neat article, with a number of good examples.
In the sorting example, I don't think you need either of your `each`s. Almost every D3 method operates in bulk.
So this example:
circles.each(function (d, i) {
d3.select(this)
.transition()
.delay(i*250)
.each(animateGrowingCircle(10, 20));
});
could be simply:
circles.transition()
.delay(function(d, i) { return i*250; })
.call(animateGrowingCircle(10, 20));