D3
A strong pick. 3rd of 9 chart libraries.
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
Overall7.8
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 7.5, likely 6.5 to 8.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.
- youngju.dev/blog/culture/2026-05-14-data-visualization-libraries-2026-d3-plot-visx-recharts-echarts-vega-comparison-deep-dive-2026.en: Use Plot or Recharts for standard charts and D3 for custom ones
- d3js.org/what-is-d3: Its maintainers recommend Plot for routine charts
- peers Recharts downloadsLast4Weeks: Recharts has about 262M downloads and is the React default for standard charts
GPT-6.2 Sol: 8.1, likely 7.0 to 9.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.
- d3js.org/what-is-d3: Documents the control and implementation effort of D3 primitives
- chartjs.org/docs/latest/getting-started/usage.html?h=ticks: Chart.js provides configured chart types and built-in components
- github.com/apache/echarts-handbook/blob/master/contents/en/get-started.md?plain=1: ECharts builds a bar chart with a single configuration
- github.com/d3/d3/releases: Two recent patches followed a long gap
- arxiv.org/html/2604.25914v1: Independent benchmark found errors in complex agent-written D3 edits
Needed by many4.9
How many developers need a tool for this job?
Claude Opus 5.5: 6.0, likely 4.5 to 7.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.
- d3js.org/what-is-d3: D3's own docs point users to Observable Plot unless they need low-level control
- techinterview.org/post/3233475188/build-charting-component-d3-recharts: Advises Recharts or Visx for standard charts and D3 only for unusual needs
GPT-6.2 Sol: 3.8, likely 2.7 to 4.9
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.
- 2025.stateofjs.com/en-US/usage: 1,795 of 10,926 respondents selected data visualization
- d3js.org/getting-started: Shows plain HTML and multiple framework integrations
- reddit.com/r/d3js/comments/1t2huy7/data_viz_with_d3js_what_would_you_recommend: Practitioners describe using D3 for highly customized work
Helps a lot8.5
How well does it do the job for those who need it?
Claude Opus 5.5: 8.5, likely 7.5 to 9.0
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.
- youngju.dev/blog/culture/2026-05-14-data-visualization-libraries-2026-d3-plot-visx-recharts-echarts-vega-comparison-deep-dive-2026.en: 2026 comparison: D3 is the right tool for Sankey, chord, force and similar charts and for building libraries
- fusioncharts.com/blog/best-react-chart-library: Unmatched flexibility, but more development effort
- npm hasTypes: No bundled types; @types/d3 needed
GPT-6.2 Sol: 8.4, likely 7.3 to 9.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.
- d3js.org/what-is-d3: Explains the modular API and control over rendering and updates
- reddit.com/r/Frontend/comments/1o266rt/whats_the_best_chart_library: Users report high flexibility and longer development time
- github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/d3/index.d.ts: Community declarations cover the D3 modules
- arxiv.org/html/2604.25914v1: DV-World measures agent performance on D3 chart edits
- trepo.tuni.fi/bitstream/10024/131287/2/BenbbaSafwane.pdf: Independent test found high memory use with many SVG marks
Holds up over time7.1
Will it still be a good choice in two years?
Claude Opus 5.5: 7.0, likely 5.5 to 8.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.
- github commitsLastYear: 6 commits in the last year
- github.com/d3/d3/releases: v7.9.1 and v7.9.2 in Nov 2026 moved the build to pnpm and vitest and added trusted publishing; v7.9.0 was the previous release
- github openIssues: Only 5 open issues against 2243 closed
- scorecard Maintained: Maintained check scores 4
GPT-6.2 Sol: 7.1, likely 5.8 to 8.3
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.
- github commitsLastYear and releasesLastYear: Six commits and two releases in the main repository
- d3js.org/what-is-d3: Names two maintainers working at Observable
- github.com/d3/d3/releases: Both November patches list Mike Bostock and the second reverts a geometry change
- github.com/d3: Separate module repositories show recent updates
- github.com/d3/d3/pulls: Several documentation pull requests remain open from 2023
Used widely7.6
How many use it, and is that growing?
Claude Opus 5.5: 8.0, likely 7.0 to 9.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.
- npm downloadsLast4Weeks: 131.9M now vs 22.0M a year ago, a ratio of about 6.0
- dependents: 86,366 repos and 6,155 packages; Chart.js has 192,834 repos
- github stars: About 114k, the most in the category
- apexcharts.com/blog/state-of-javascript-charting-2026: D3 has the most downloads and stars among the charting libraries it measured, partly because other libraries build on it
GPT-6.2 Sol: 7.2, likely 6.0 to 8.4
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.
- npm downloadsLast4Weeks, npm downloadsSame4WeeksYearAgo, and medianDownloadsRatio: D3 grew about 6.0× against a 4.1× benchmark
- dependents, github stars, and peers: 86,366 tracked repositories and the most stars among peers
- github.com/mermaid-js/mermaid/blob/develop/packages/mermaid/package.json: Mermaid installs the full D3 package
- github.com/observablehq/plot/blob/main/package.json: Observable Plot installs the full D3 package
- d3js.org/getting-started: Documents CDN and standalone module use
Vouched for8.1
Who stands behind it being good?
Claude Opus 5.5: 8.0, likely 7.0 to 9.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.
- apexcharts.com/blog/state-of-javascript-charting-2026: Victory, billboard.js and visx build on D3
- monterail.com/blog/javascript-libraries-data-visualization: Recommends D3 when the chart is the product
- D3 use in newsrooms and by Observable: Long-standing production use at major publishers
GPT-6.2 Sol: 8.2, likely 7.1 to 9.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.
- datavisualizationsociety.org/dvs-plus/soti-report-2025: Independent practitioner survey places D3 among frequently used favorites
- github.com/mermaid-js/mermaid/blob/develop/packages/mermaid/package.json: Mermaid declares D3 as a runtime dependency
- github.com/vega/vega/blob/main/docs/docs/scales.md: Vega relies on d3-scale for visual encodings
Safe7.6
How safe is it to depend on?
Claude Opus 5.5: 8.0, likely 7.0 to 9.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.
- advisories total: 0 advisories
- scorecard score: 5 overall; Security-Policy, SAST, Pinned-Dependencies and Token-Permissions all 0
- npm dependencies: 30 dependencies, all first-party d3 modules
- github.com/d3/d3/releases: Moved to npm trusted publishing in v7.9.1
GPT-6.2 Sol: 7.1, likely 5.9 to 8.3
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.
- npm license and dependencies: Permissive ISC license and 30 direct dependencies
- advisories and scorecard checks: Zero direct advisories and several weak repository controls
- github.com/advisories/GHSA-36jr-mh4h-2g58: The d3-color advisory was fixed in 3.1.0
- github.com/d3/d3/blob/main/package.json: D3 7.9.2 requires d3-color 3.1.1 or later within v3
- github.com/d3/d3/releases/tag/v7.9.1: Release notes confirm the adoption of npm trusted publishing
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
- npm downloads, 4 weeks
- 132M ×6.0 in a year
- GitHub stars
- 114k
- Commits, 12 months
- 6
- npm version
- 7.9.2 Nov 2026
- Versions, 12 months
- 2
- Advisories, 24 months
- 0 of 0 ever
- OpenSSF Scorecard
- 5.0 out of 10, Nov 2026
- Licence
- ISC
Read on 21 November 2026 from GitHub (d3/d3), npm (d3), OSV and the OpenSSF Scorecard.