Does anyone know what is the difference?
My understanding is that both would return the same selections.
However when I am doing an append, if I use selectAll("p") it does not work.
For instance, this works:
var foo = d3.select("body")
.selectAll("p")
.data([1, 2, 3, 4]);
foo.enter.append("p")
While this does does not work:
var foo = d3.selectAll("p")
.data([1, 2, 3, 4]);
foo.enter.append("p")
Why is it that the latter doesn't work?