Skip to content
Type
js library
Verdict
Useful
Licence
Ship licence, open source permissiveopen-source-permissiveISC, per the d3/d3 repository, which had 113,822 stars at review and showed version 7.9.0 on the site. Examples are hosted as Observable notebooks and carry their authors' credits.
Agent channels
none
Pricing
free
Reviewed

← Atlas · Topics: data-viz, documentation

D3 ​

Type
js library
Verdict
Useful
Licence
Ship licence, open source permissiveopen-source-permissiveISC, per the d3/d3 repository, which had 113,822 stars at review and showed version 7.9.0 on the site. Examples are hosted as Observable notebooks and carry their authors' credits.
Agent channels
none
Pricing
free
Reviewed

What it is ​

D3 is a JavaScript library for building visualisations by hand rather than by configuration. It binds data to the DOM, SVG or canvas and gives you scales, shapes, paths, projections and transitions as separate packages, so you choose every mark, label and interaction. The site is a one-screen pitch followed by a mosaic of small live charts, each labelled and credited to its author, and each opening an Observable notebook where the chart and its code sit side by side.

When to open it ​

  • The chart you need does not exist in any library: a marimekko, a Voronoi treemap, a divergence layout, a map with custom projection.
  • A chart library gives you 80% of the look and the last 20% is the point.
  • You want to study how a specific form is built — the gallery is a catalogue of finished answers with the code attached.

Most useful ​

  • The example mosaic: small tiles such as a stacked horizontal bar, a bubble chart, a diverging stacked bar, a Sankey, a streamgraph, a marimekko, hierarchical edge bundling, Voronoi stippling, a solar terminator or a phylogenetic tree. Each one is a complete, credited notebook that you can read, fork and adapt.
  • The gallery as a form vocabulary: browsing it is the fastest way to learn the name of a chart shape you have seen but cannot describe, which is useful before commissioning an illustration or writing a prompt.
  • Separate packages per concern: selection, scale, shape, axis, transition, hierarchy, force, geo and colour schemes ship independently, so a bundle carries only what it draws.
  • Colour schemes: sequential, diverging and categorical palettes exposed as arrays, which is handy when a chart must inherit a brand palette rather than a chart library's default.
  • Reference documentation: precise API pages per module instead of tutorials, which suits a reader who already knows what a scale is.

Using it with agents ​

No agent channel was published at review: no llms.txt, no MCP server. The examples are the practical resource, and they live on Observable, so an agent reading only d3js.org gets the API surface but not the worked examples. Give an agent a specific notebook URL when you want it to follow a pattern.

Watch out for ​

  • D3 gives you primitives, not components. Axes, tick formatting, tooltips, legends, empty states, keyboard access and screen-reader text are all yours to build and to keep consistent across charts.
  • Accessibility is the usual casualty: an SVG without a title, description and a text alternative is invisible to assistive technology, and D3 will happily render one.
  • The API changed between major versions, and a great deal of tutorial code online targets v3 or v4. Check the version in any example before copying it.
  • Server-side rendering needs a DOM shim or canvas; the library assumes a browser by default.
  • Examples moved to Observable. observablehq.com puts automated fetches behind a security checkpoint at review, so a bot asking for a chart may get a 429 instead of the page.
  • A bespoke chart is a maintenance commitment. If a stock bar chart answers the question, a D3 version will cost more than it returns.

Reusable ideas ​

  • Show finished work first and code second; a gallery of small live charts teaches faster than a features list.
  • Credit the author of every example, and keep each one copyable as a single notebook.
  • Separate data, scale and mark into different modules so a bundle can drop what it does not draw.
  • Name the chart forms in the gallery, so the catalogue doubles as a glossary.

Evil Charts, Tremor, Pele