-
Book Overview & Buying
-
Table Of Contents
Learn D3.js - Second Edition
By :
This book is a practical hands-on introduction to D3.js (Data-driven documents), an open-source JavaScript library for creating dynamic, interactive data visualizations for the web. Built on standard web technologies, D3 provides tools for binding data to visual elements and controlling how those elements are rendered and updated in the browser.
Unlike charting libraries that provide ready-made chart types, D3 gives you the building blocks to create visualizations with HTML, CSS, SVG, and Canvas. Although this means that even simple charts may require more code at first, it also gives you the flexibility to create fully customized visualizations tailored to your data and design requirements.
In this book, you will develop a solid understanding of D3’s core concepts, modules, and workflows through a hands-on, example-driven approach. You will start with the fundamentals and progressively move on to more advanced topics, building a wide range of visualizations along the way, from bar, line, pie, and scatter charts to trees, treemaps, circle packs, Sankey diagrams, force-directed networks, and thematic maps.
Each chapter combines focused explanations with practical examples and step-by-step visualizations to help you apply what you learn. The book also includes downloadable code examples and exercises with complete solutions, allowing you to experiment further and reinforce your understanding as you progress.
All code used in the book is available in a public GitHub repository (see details below). Because many of the printed code listings focus on specific concepts, they often show only part of the full source. The complete code for every example can be downloaded and run locally, and references to the corresponding files are provided throughout the book.
The content covers both fundamental and advanced features of D3 and is based on D3 version 7.9.0 and ES2019 JavaScript.
When writing this book, I made every effort to present the material as accurately as possible. Code listings were extracted from working examples, and additional care was taken to ensure that all examples are correctly referenced and function as intended.
I have been using and teaching D3 since version 3, and much of this book is shaped by that experience. My main motivation in writing it was to share what I have learned while exploring, using, and teaching D3 over the years. I hope you find this book both useful and enjoyable.