Bost.ocks.org/mike/d3/workshop/#0.
D3.js Playground. Thinking with Joins. Say you’re making a basic scatterplot using D3, and you need to create some SVG circle elements to visualize your data.
You may be surprised to discover that D3 has no primitive for creating multiple DOM elements. Wait, WAT? Sure, there’s the append method, which you can use to create a single element. svg.append("circle") .attr("cx", d.x) .attr("cy", d.y) .attr("r", 2.5); Jerome Cukier.