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 ...

Get Data Visualization with D3 and AngularJS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.