view source
A visual explanation of the Enter, Update and Exit Selections in D3js
One of the first things that you encounter when working with d3js is the notion of selections, namely — update, enter and exit selection. At times, it might seem a bit confusing for starters when and why you need to use selections to manipulate your visualizations.