-
Book Overview & Buying
-
Table Of Contents
Learn D3.js - Second Edition
By :
This section covers data binding and joining, which are the core features of D3.
If it were just for selecting and appending elements, you would be fine with the DOM API. What makes D3 special is its ability to bind selections to data, allowing the data itself to dictate which elements are added or removed in response to changes. After an update, visual changes should reflect the new data. You can synchronize and merge the updated selections yourself, appending and removing elements as necessary, or let D3’s join() method manage the process automatically.
Table 6.6 describes selection methods used to bind data, manage how elements are attached to data, and synchronize them after data updates.
|
Method |
Description |
|
|
Binds a data array to a selection, returning a new selection object (called the update selection... |