Summary
This chapter gave an introduction to the basic usage of D3.js. You learned how to properly use CSS Selectors to find elements by name, #id, .class, and [attribute] in the DOM tree. We saw how to combine selectors with selector1selector2 by logical AND and with selector1,selector2 by logical OR, and how to apply hierarchically selector1 selector2 or by direct ancestors selector1 > selector2.
We also discussed how to modify all elements in Selections of HTML and the SVG elements with the usage of the methods .attr(), .style(), .property(), .text(), and so on. It's important to remember that most of the time we will use the .append() function to insert new elements to a Selection.
Later in this chapter, we learned how to use data binding with ...
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