Selectios are a subclass of array. it provides methods to manipulate selected elements, such as setting attributes and styles.


Selections are arrays of arrays of elements:

d3.select(): select a selection with one group


data is not a property of the selection, but a property of its elements.

When binding data to a selection, the data is stored in the DOM rather than in the selection.

data is persistent while selections can be considered transient.

Data is bound to elements one of several ways:

1. Joined to groups of elements via selection.data.
2. Assigned to individual elements via selection.datum.
3. Inherited from a parent via append, insert, or select.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s