# D3: 7.8 out of 10

A strong pick. 3rd of 9 in [Chart libraries](https://elestia.ai/opensource/charts/index.md).

D3 is the low-level toolkit that most custom data visualisation on the web is built on. It is the best choice when the chart itself is the product or the chart type is unusual. For standard dashboard charts, Recharts, ECharts, Chart.js or Observable Plot get you there with far less code.

**Best for:** Developers who build custom or unusual visualisations, or their own chart components, and need full control over every mark.

## Scores

- **Overall: 7.8** (likely 6.8 to 8.8)
  - Claude Opus 5.5 (7.5): D3 is clearly the best pick for custom, bespoke or unusual visualisations, and for building chart components. It is stable, safe and widely trusted. It is not the default for typical app dashboards, where Recharts, ECharts, Chart.js or Observable Plot deliver standard charts with much less code. Slow development is acceptable for such a mature library, but it keeps the score below the top band.
  - GPT-6.2 Sol (8.1): D3 is a leading choice when a new project needs a custom layout, precise interaction, or direct control over rendering. Chart.js and Apache ECharts make standard dashboards quicker to build with ready-made chart types. D3's proven modules and recent patches support starting with it for custom work, with some uncertainty about the pace of future maintenance and the effort needed to review complex agent-written charts.
- **Needed by many: 4.9** (likely 3.6 to 6.0)
  - Claude Opus 5.5 (6.0): Many web apps need charts, and D3 works with any framework or runtime. Its low-level approach suits a smaller group than ready-made chart libraries do: people building custom visuals, data journalism, or chart components. Most teams that only need standard charts do not need raw D3.
  - GPT-6.2 Sol (3.8): About 16% of respondents to the 2025 State of JavaScript usage question reported using JavaScript for data visualization. D3 works across frameworks, and its strongest fit is the subset of projects that need custom graphics or individual visualization modules. The survey did not measure how often developers need that level of control.
- **Helps a lot: 8.5** (likely 7.4 to 9.2)
  - Claude Opus 5.5 (8.5): D3 is the most capable and flexible visualisation toolkit in JavaScript. It has excellent documentation and a very large body of examples that AI agents draw on. The limits are effort and ergonomics: no ready-made charts, no bundled types, and friction with frameworks that own the DOM. Measured against the job of drawing any picture of data, it is the best available. For standard charts, peers do the job with less work.
  - GPT-6.2 Sol (8.4): D3 7.9.2 combines well-documented scales, layouts, data joins, and transitions with fine control over SVG and Canvas rendering. Users report a steep learning curve, and TypeScript declarations come from DefinitelyTyped. The 2026 DV-World benchmark found that leading agents struggled with complex D3 chart edits. An older rendering benchmark showed that performance depends heavily on how many SVG elements the chart creates, leaving current speed rankings uncertain.
- **Holds up over time: 7.1** (likely 5.7 to 8.2)
  - Claude Opus 5.5 (7.0): D3 v7 has been stable since 2021 and rarely breaks code. In November 2026 it shipped two releases that modernised the build and moved to npm trusted publishing, which shows it is still cared for. Activity is low, with 6 commits in a year, and the work rests on a small team at Observable. The ecosystem keeps building on its modules, so it is unlikely to fade within two years.
  - GPT-6.2 Sol (7.1): Two maintainers work on D3 at Observable, and several separately maintained D3 modules received updates in November. The main repository recorded six commits in the past year and shipped both patches on November 3 after a long release gap. The latest patch quickly reverted a geometry change, though several documentation pull requests have waited since 2023 and the release history shows one recent publisher.
- **Used widely: 7.6** (likely 6.5 to 8.7)
  - Claude Opus 5.5 (8.0): Downloads were 132M in the last 4 weeks against 22M a year before. That ratio of about 6.0 is above the 4.1 median, but much of it comes from tools such as Mermaid that install d3 for their users. Dependents (86k repos and 6k packages) are second only to Chart.js in the category. D3 also leads every peer on stars. Direct choices number in the hundreds of thousands, though developers who pick it by hand for new work are a smaller share than the totals suggest.
  - GPT-6.2 Sol (7.2): D3 grew from 22 million to 132 million npm downloads over comparable four-week windows, about 6.0× against the catalog median of 4.1×. That growth trails Recharts and Apache ECharts. The tracked 86,366 dependent repositories put D3 below Chart.js and above both, and its roughly 114,000 stars lead the peer group. Automated and downstream installs raise the download count, while CDN use and individual module imports leave some D3 users outside it.
- **Vouched for: 8.1** (likely 7.1 to 9.1)
  - Claude Opus 5.5 (8.0): D3 is the standard foundation for data journalism and custom visualisation, and many chart libraries build on its modules (visx, Victory, Nivo, Recharts). Independent 2026 comparisons still call it the tool for custom visuals. Current survey data on its satisfaction was not available, which keeps the range from being narrower.
  - GPT-6.2 Sol (8.2): Mermaid depends on the full D3 package, and Vega uses D3 scales. In the 2025 Data Visualization Society survey, D3 ranked high for both frequency of use and enjoyment, with 11% of people who listed favorites naming it. These results chiefly validate D3 among visualization specialists and as a foundation for other tools.
- **Safe: 7.6** (likely 6.5 to 8.7)
  - Claude Opus 5.5 (8.0): No advisories have ever been recorded, the licence is permissive (ISC), and the code has no install scripts or network access. The 30 dependencies are all d3-* modules from the same organisation, and releases now use npm trusted publishing. The Scorecard is 5, pulled down by unpinned dependencies, token permissions and the lack of a security policy and SAST.
  - GPT-6.2 Sol (7.1): The package uses the permissive ISC license, and the bundle records zero advisories for d3 itself. The current release includes a version of d3-color with the fix for its historical denial-of-service advisory. D3 adopted npm trusted publishing in 7.9.1. The full package brings in 30 direct dependencies, and its 5/10 OpenSSF Scorecard flags gaps in workflow pinning, token permissions, and the security policy.

## Good

- It has no equal for custom work: scales, shapes, force layouts, geo projections, hierarchies and transitions are all available as composable modules.
- It works with any framework and renders to SVG, Canvas or HTML.
- It is very mature and stable, has no known advisories, uses the ISC licence, and AI coding agents write correct code for it.
- Visx, Victory, Nivo, Recharts' internals and Mermaid all build on it, so the skills transfer.

## Bad

- A standard bar or line chart takes dozens of lines that a charting library does in a few, and you build axes, legends and tooltips yourself.
- Its imperative DOM style clashes with React and similar frameworks, so you have to wire the two together by hand.
- It has no bundled types, so TypeScript users rely on the community @types/d3 package.
- Development is slow, with 6 commits in the past year, and depends on a small core team at Observable.

## The numbers

- Downloads, 4 weeks: 132M
- In a year: ×6.0
- GitHub stars: 114k
- Commits, 12 months: 6
- Last npm release: Nov 2026
- Advisories, 24 months: 0
- Licence: ISC
- GitHub: https://github.com/d3/d3
- npm: https://www.npmjs.com/package/d3

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 21 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
