This example shows the very basics of the D3 data binding system, which creates selections via data joins.
A set of
circle elements are initialized with
data, which creates the three selections:
enterselection: elements that did not previously exist.
updateselection: elements that currently exist.
exitselection: elements that exist, but have no longer have data.
In this code, for each element in the
enter group, we append a new
circle element. We then calculate its properties from the data that has been joined with it.
For a full explanation and demo, see the General Update Pattern article.