What if this
svg.append("g")
.appendAll("rect", data)
were shorthand for this
svg.append("g")
.selectAll()
.data(data)
.enter()
.append("rect")
The latter is a common special case of the data-join, and it seems worthwhile to support it explicitly? Some optimizations:
- You don’t need a selector (pass undefined to selection.selectAll, which is already optimized)
- You don’t need a key function (because the initial selection is necessarily empty)
- You only need the enter selection (because the initial selection is necessarily empty)
- You don’t need to call selection.order (because the initial selection is necessarily empty)
What if this
were shorthand for this
The latter is a common special case of the data-join, and it seems worthwhile to support it explicitly? Some optimizations: