liveBook · Manning

D3.js

As explained in Everyday Data Visualization

D3.js is a free, open-source JavaScript library for producing dynamic, data-driven documents and visualizations in web browsers.

D3.js—also called D3 or Data-Driven Documents—is a free, open-source JavaScript library for creating dynamic, data-driven visualizations in web browsers. It combines web standards with a flexible, sometimes pleasantly wordy, approach to chart construction. section 1.5.3

D3.js is especially useful when you need to:

  • Create custom browser visualizations using SVG, HTML5, and CSS. section 1.5.3
  • Choose only the library components a visualization needs instead of importing everything. section 1.5.3
  • Work alongside front-end frameworks such as React or Angular. section 1.5.3

A basic bar chart

A simple fruit-data bar chart can be created in roughly 50 lines of D3.js code. D3 visualizations also appear in web publications such as The New York Times. section 1.5.3

Figure 1.9 A basic bar chart created in d3.js
01-09

Use the figure to inspect a basic D3.js bar chart built from fruit data. section 1.5.3

How Everyday Data Visualization covers it

How deep it goes
Demonstrates a basic bar chart and core technologies, but defers coding instruction and detailed implementation.
Examples
Uses fruit data, a basic bar chart, and web visualizations such as those published by The New York Times.
What it assumes
Assumes some comfort with JavaScript and asynchronous behavior while explicitly avoiding foundational coding instruction.
What you can do after
Build a basic browser bar chart with D3.js using approximately 50 lines of code.
How it connects
Connects JavaScript, SVG, HTML5, CSS, React, Angular, and asynchronous browser behavior.

Also explained in

Compare how 3 books explain D3.js →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Everyday Data Visualization. The section links point to the parts of the book it draws on.