D3js: When to use .datum() and .data()?
I think the documentation gives a good answer to this question: https://github.com/mbostock/d3/wiki/Selections#wiki-datum. Basically, the point is that in some cases you are not interested in the enter/exit sets when you do a selection. If this is the case, which often seems to be the case for the full chart, you use datum. Update: It depends: … Read more