D3.js: Data Visualization for the Web cover

Web · Ebook

D3.js: Data Visualization for the Web

by Shriira Press

4.4(4,512)95 pagesPublished 2026

A comprehensive, self-contained guide to D3.js (Data-Driven Documents), the library behind the web's most sophisticated, custom data visualizations — the interactive graphics in the New York Times, the bespoke dashboards, the animated explanatory charts that no off-the-shelf charting library could produce. D3 is not a charting library; it's a set of low-level building blocks — selections, data joins, scales, shapes — that you compose into exactly the visualization you envision, bound to data and rendered as SVG (or Canvas) in the browser. This book teaches it from first principles: selections and the famous data join, scales (the heart of D3), SVG, axes and shape generators, loading data, building charts, transitions, interaction, layouts and maps, and the ecosystem. It blends intuition, the concepts behind the API, and runnable code.

Contents

  1. 1Preface
  2. 2Chapter 1 — What Is D3.js?
  3. 3Chapter 2 — Selections: D3's Core
  4. 4Chapter 3 — The Data Join: Enter, Update, Exit
  5. 5Chapter 4 — Scales: Mapping Data to Pixels
  6. 6Chapter 5 — SVG for Visualization
  7. 7Chapter 6 — Axes and Gridlines
  8. 8Chapter 7 — Shapes and Generators: Lines, Areas, Arcs
  9. 9Chapter 8 — Loading and Transforming Data
  10. 10Chapter 9 — Building Charts: Bar, Line, Scatter
  11. 11Chapter 10 — Transitions and Animation
  12. 12Chapter 11 — Interaction: Events, Zoom, Drag, and Brush
  13. 13Chapter 12 — Layouts: Hierarchies, Networks, and Maps
  14. 14Chapter 13 — The Ecosystem, Frameworks, and the Profession
  15. 15Appendix A — Glossary and API Quick Reference
  16. 16Appendix B — Further Reading and Resources