O'Reilly logo

Interactive Data Visualization for the Web, 2nd Edition by Scott Murray

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix B. What’s New in 4.0

A lot changed in version 4.0 of D3! In case you were just getting comfortable with version 3.x, you may feel as though 4.0 pulled the rug out from under you. Here I’ve summarized the changes most likely to affect beginner users of D3; this appendix addresses only the changes that impact what you would have learned from the first edition of this book.

For the rest, see Mike Bostock’s exhaustive list of “Changes in D3 4.0”. Also see Mike Bostock’s essay “What Makes Software Good?” for context and the rationale behind these changes.

The good news is that the fundamental principles baked into D3 (such as that of the data join) are unchanged. But 4.0 was rewritten from the ground up, and there are several significant structural and syntactical changes. 4.0 is decidedly not backward compatible.

Modularity

No longer one giant, hulking library, D3 is now modular, meaning it’s made up of many tiny libraries, each focused on a specific domain. Unless your project is super fancy, you can probably just use the default bundle, which includes the following D3 microlibraries or modules (each repository for which also contains its own documentation):

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required