The Enter Selection
D3 introduces two new selections called enter and exit. Let's discuss what the enter selection is
We'll cover the following
The data()
method we used previously returned a selection object. However, the selection object is slightly different from other selection objects we have worked with thus far. There are two new properties called _enter
and _exit
. We will be discussing what the enter selection is in this lesson.
What is the enter selection?
Joining data can become complex when the ratio between data and elements is not 1-to-1. If we have more elements than we have data, we should remove excess elements. If there are fewer elements than we have data, we should add more elements.
In the developer tools, the selection object returned was different from the previous selection objects.
Get hands-on with 1400+ tech skills courses.