D3
npmfreeLow-level visualization tools for bespoke scales, shapes and layouts.
pnpm add d3D3
Low-level visualization tools for bespoke scales, shapes and layouts.
Use it well
Use existing chart components first when they fit. D3 is a composition toolkit, not a ready-made UI. Assign DOM ownership carefully in React and budget for axes, interaction and accessibility.
Install one suitable engine for the task. Existing shadcn charts remain useful for conventional React dashboards. Chart engines and integration recipes do not become complete application components just by installing their npm package.
Install
pnpm add d3
Check the consuming project's installed versions first; preserve its stack and theme. Renderer support is a library capability: alternate renderers or plugins can require additional dependencies. Provide real data, units, loading/empty/error states and an accessible table or explanation.
Public references
- Documentation: https://d3js.org/
- Repository and license: https://github.com/d3/d3
- Package metadata: https://registry.npmjs.org/d3/latest
Starting patterns
- Custom chart scales — Map measured values into positions and sizes. Install:
pnpm add d3. - Custom chart shapes — Compose lines, areas and arcs. Install:
pnpm add d3. - Hierarchy layouts — Explore trees and nested structure. Install:
pnpm add d3. - Force-directed layouts — Arrange connected entities through a simulation. Install:
pnpm add d3. - Region selection — Select a region within a chart. Install:
pnpm add d3.
Verification and previews
Public package metadata and documentation links audited 2026-10-18. Initial package version: d3@7.9.0. The primary package declares no npm peer dependencies.
This is a metadata/reference audit, not a fresh-project runtime, browser, accessibility or performance verification. Generated entries retain current package metadata after sync. External examples stay on the source site; hosted adapters require separate implementation, attribution and browser checks.
Refresh this source with pnpm sync d3 or the full group with pnpm sync charts, then pnpm catalog. Curated inputs live in catalog/chart-libraries.json; npm metadata is read without installing packages. Unknown or changed licensing fails sync for review.