The Exit Selection

The exit selection is a list of elements that should be removed from the document.

The exit selection is the opposite of the enter selection. It is an array of elements that should be removed. In some cases, we may have more elements than we have data. The excess elements should be removed.

Whenever we call the data() method, D3 will create an exit selection. Let’s view what the exit selection looks like. First, we need to modify our current codebase to be able to view it.

Get hands-on with 1200+ tech skills courses.