d d d
Looking over some d3 code, I keep seeing .enter() .update() and .exit()
as part of the standard workflow. What are these all about?
So in old-school HTML DOM interactions, selections are array-like objects called NodeList
s
I appears D3 works in a similar manner, by providing an API into a “selection” of SVG elements.
A key part of D3 is you begin by declaring a relationship to SVG elements that don’t necessarily exist yet.
In other words: declare a relationship between a selection of SVG elements data and data, then “enter” into that selection and flesh out the details.
Read more here from the author of D3, Mike Bostock.