(I might have missed it in your tutorial, but if not...) It might be worth noting for your readers that attr, style, property and similar methods can accept an object as the argument. Might save people a tiny bit of typing...<p><pre><code> root.selectAll('rect')
.data(rects).enter()
.attr({
x: function (d) { return d.x; },
y: function (d) { return d.y; },
width: function (d) { d.w; }
});
</code></pre>
<a href="https://github.com/mbostock/d3/pull/277" rel="nofollow">https://github.com/mbostock/d3/pull/277</a>