-
Book Overview & Buying
-
Table Of Contents
Learn D3.js - Second Edition
By :
D3 offers a functional flow-based DSL for connecting data to DOM elements. It’s an efficient alternative to the verbose DOM API, avoids the need for JavaScript loops, facilitates updating in interactive charts, and is compact and readable once its fundamentals are understood. This chapter will explore it in detail.
The toolset is provided by the d3-selection module – the most important module in D3. It contains tools to select DOM nodes, o filter selections, bind data to selections, modify element properties, attributes, styles, classes, and contents, add and remove elements from a node tree, handle and dispatch events, apply animated transitions, sort nodes, call arbitrary functions, and iterate over a node set.
Many of the features discussed in this chapter have already been used in previous chapters, as selections are a fundamental component in any D3 application, but the goal of this chapter is to dive a bit deeper, provide a comprehensive...