Join Ray Villalobos for an in-depth discussion in this video Binding data to the DOM, part of D3.js: Data Visualization.
So select all and then just pick the elements with the class of…item which would be all these guys right here.…And then I'm going to tell the data method to pass…along a value of a single array with an element called true here.…And then, we'll use the style method to pass along a style, and…this is just going to be background color right now, just this color right here.…Let's go ahead and save this.…And notice that the first element became highlighted or…the first element here got this background that we added in.…
- What is D3.js?
- Creating a basic document structure
- Controlling HTML DOM elements
- Binding data to the DOM
- Drawing SVG graphics with D3
- Using ordinal scales
- Adding events and transitions
- Working with data
- Creating and adjusting layouts