The update pattern in D3 version 3
A correct understanding of how the “enter”, “update” and “exit” selections work is fundamental for properly changing the dataviz using D3.
Since D3 version 3 (actually, since version 2), this snippet could set the transitions for both “enter” and “update” selecti...