Selecting and binding data
Before we start with a step-by-step example, you should have a basic understanding of how D3 manipulates DOM elements and binds them to data sources. You already had a basic introduction to selections in the previous chapters. This section will provide some more details about selecting, appending, and removing elements.
This section will also provide an introduction to data binding, which will be necessary for the step-by-step example and will be covered in detail in Chapter 4, Data Binding. We will investigate what happens to an element when D3's data-driven mechanism is applied. You should try running these examples by using the files available in the GitHub repository for this chapter, or by typing the commands ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access