The State of JavaScript Charting in 2026
There is no single best JavaScript charting library in 2026, and anyone who tells you otherwise is selling something. The field is mature and crowded, and the libraries that lead differ depending on whether you weigh raw adoption, developer enthusiasm, bundle weight, rendering engine, framework fit, or license. So instead of ranking, we measured. We pulled the real numbers for 13 widely used libraries and mapped where each one actually sits.
The short answer to "which is the most popular": by npm downloads, the React-native libraries dominate the top of the chart, led by Recharts, with the framework-agnostic veterans Chart.js and ECharts close behind. By GitHub stars, D3 towers over everything. Neither metric means what it looks like at first glance, and this post is about why.
Key takeaways
- Popularity depends entirely on the metric. Recharts leads npm downloads at 219.4M in the last 30 days, but that number is inflated by transitive dependencies. D3 leads GitHub stars at 113.2k, but D3 is a toolkit, not a charting library. Chart.js is the most-downloaded library that is genuinely a chart library people install on purpose.
- The field splits three ways, and that split matters more than any ranking: rendering engine (SVG vs canvas vs WebGL), framework model (React-only vs agnostic), and license (open source vs commercial).
- Bundle size spans a 7x range, from about 49 KB (
@visx/xychart) to 359 KB (ECharts, full build), and the raw numbers mislead: the biggest libraries are also the most tree-shakeable. - "Free" has conditions, and they are not uniform. Chart.js, D3, ECharts, Recharts, and most of the field are unconditionally free (MIT or Apache). Highcharts is free only for non-commercial use, amCharts 5 only with an attribution link, and ApexCharts is free for non-commercial use and for companies under $2M in revenue. Check the terms before you ship.
- There is no wrong-by-default choice left. Every library here is viable. The question is fit, and the data below tells you which axis to decide on.
How we measured this
Every number in this post is real, dated, and reproducible. No estimates, no vendor claims.
- npm downloads: the npm downloads API,
point/last-month, covering 6 June to 5 July 2026. - GitHub stars: the GitHub REST API
stargazers_count, read on 7 July 2026. - Bundle size: bundlephobia's size API, the minified and gzipped size of each package's main export, on 7 July 2026.
Three honest caveats you must keep in mind while reading:
- npm downloads are not developer choice. They count continuous-integration runs, registry mirrors, and, most importantly, transitive installs. A library that ships inside other popular packages racks up downloads whether or not developers chose it directly. This is exactly why Recharts sits so far ahead.
- GitHub stars flatter open source and toolkits. Commercial products whose primary distribution is not the starred repo look smaller than they are. The amCharts 5 npm repo is a build mirror, so its 440 stars say nothing about amCharts usage.
- Bundle size is the full build. Modular libraries import much smaller in practice. Treat the bundle figures as an upper bound, not a fixed cost.
We also excluded Chartist. It was popular years ago, but at roughly 198k monthly downloads and no meaningful recent development, it is a legacy option in 2026, not a live contender.
The data, live
The chart below is rendered with ApexCharts (we use our own library for our own research). Toggle between the three metrics. The ApexCharts bar is tinted only so you can find it; the order is the raw data.
Measured 7 July 2026. npm downloads count CI, mirrors, and transitive-dependency installs, not only direct developer choice. Recharts is inflated by being a common transitive dependency across the React ecosystem. The ApexCharts bar is highlighted only so you can find it; the ranking is the raw data.
Read it metric by metric and a pattern appears. The download chart is topped by React libraries and long-lived generalists. The stars chart reshuffles the order and puts a low-level toolkit on top. The bundle chart inverts the usual assumption that the most capable libraries are the leanest. The rest of this post works through what each of those tells you.
Which JavaScript charting library is the most popular in 2026?
By direct, intentional installs, Chart.js is the most popular dedicated charting library, at 54.0M downloads a month and 67.5k stars. It renders to canvas, it is framework-agnostic, and it has been the default "just give me a chart" choice for years.
Recharts shows a larger download number (219.4M) but it needs the transitive-dependency caveat: it is bundled inside a large share of the React ecosystem, so much of that volume is indirect. Its 27.3k stars are a fairer read of deliberate adoption, and they place it firmly in the top tier for React specifically, not across the board.
D3's position is the one most people misread. Its 113.2k stars lead every charting-adjacent project on GitHub, but D3 is not a charting library. It is a low-level toolkit for binding data to the DOM, and it is the substrate that several libraries in this list (Recharts, Victory, billboard.js, visx) build on. Its star count reflects its foundational status, not that people reach for it to draw a bar chart.
So the honest ranking of libraries you would actually install to make a chart, by download volume, is Chart.js, then ECharts (14.7M), then Highcharts (9.7M), then ApexCharts (7.8M), with Recharts sitting above all of them inside React apps but carried there partly by dependencies.
Which libraries have the most momentum?
GitHub stars are a rough proxy for developer enthusiasm, and they tell a different story than downloads. After D3 (113.2k), Chart.js (67.5k) and ECharts (66.8k) are nearly tied, which is notable because ECharts is far less discussed in Western developer circles than its star count warrants. It is a genuinely major library, backed by the Apache Foundation, and strongest in dense, analytical, and geospatial visualizations.
Below that top group, Recharts (27.3k), visx (20.9k), and Plotly.js (18.2k) form a middle tier, followed by a cluster of SVG-based libraries including Lightweight Charts (16.5k), ApexCharts (15.1k), Nivo (14.0k), Highcharts (12.5k), and Victory (11.2k) all within a few thousand stars of each other. In other words, once you are past the top three, "most loved" is a close race, and star count alone should not decide it for you.
How big are these libraries?
Bundle size spans roughly 49 KB to 359 KB gzipped across this set, but the ranking is the opposite of what most developers assume. The heaviest full builds belong to the most capable, batteries-included libraries: ECharts (359 KB), ApexCharts (164 KB), Nivo (143 KB), and Recharts (142 KB) ship a lot of chart types and interaction out of the box. The lightest are either narrowly scoped or aggressively modular: @visx/xychart (49 KB) is one entry point of a component toolkit, and Lightweight Charts (60 KB) does one thing (financial time series) extremely well.
The trap is comparing full builds as if they were fixed costs. ECharts, Chart.js, D3, and visx are all modular: import three chart types and you ship a fraction of the headline number. Batteries-included libraries like ApexCharts and Plotly trade some of that for a simpler mental model, where most features are present without opt-in wiring. Neither approach is wrong. If bundle weight is your hard constraint, favor a modular library and measure your real import; if developer time is the constraint, the larger all-in-one libraries often win.
For the full picture on why the rendering engine drives both size and capability, see our companion piece on SVG vs canvas for charts.
SVG, canvas, or WebGL: what is each library rendering with?
The rendering engine is the single most useful way to categorize a charting library, because it predicts the library's ceiling on data volume and its floor on interactivity and accessibility. Here is where each one sits.
| Library | Engine | Consequence |
|---|---|---|
| ApexCharts | SVG | Crisp, per-element interaction and accessibility; SVG data-volume ceiling |
| Highcharts | SVG | Same SVG profile; long-established rendering |
| Recharts | SVG | React components map to SVG elements |
| Victory | SVG | SVG, also works in React Native |
@visx/xychart | SVG | You compose SVG primitives yourself |
| billboard.js | SVG | D3-based SVG rendering |
| D3.js | SVG (canvas capable) | You choose; SVG by default |
| Chart.js | Canvas | Flat cost at high point counts; manual hit-testing |
| Lightweight Charts | Canvas | Built for large financial series |
| amCharts 5 | Canvas | Canvas-first rendering |
| Nivo | SVG and Canvas | Per-chart choice of engine |
| ECharts | Canvas (SVG optional) | Canvas by default, SVG renderer available |
| Plotly.js | SVG and WebGL | WebGL trace types for very large scatter and 3D |
The takeaway: SVG libraries win on interactivity, crisp export, and out-of-the-box accessibility, and hit a ceiling in the low thousands of individual marks. Canvas and WebGL libraries win at high data density and pay for it in inspectability. If accessibility is a requirement, note that SVG is a much better starting point, a finding we measured directly in our charting accessibility audit.
Is JavaScript charting a React story now?
Partly, and it is the biggest shift of the last few years. Four of the 13 libraries here (Recharts, Nivo, Victory, visx) are React-only, and Recharts alone accounts for a huge share of React charting by download.
But the framework-agnostic libraries still lead the field as a whole. Chart.js, ECharts, Highcharts, ApexCharts, Plotly, and amCharts render anywhere and ship official or community wrappers for React, Vue, and Angular, so you are not locked to one framework. This matters more than it used to: teams increasingly run more than one framework, and a chart library that outlives a framework migration is worth something. The agnostic-core-plus-wrapper model is why these libraries keep broad reach even as React-native options grow.
Which of these are actually open source?
This is where developers get caught, so be precise about it. A large part of the field is genuinely open source under permissive licenses: Chart.js, D3, Plotly.js, Recharts, Nivo, Victory, billboard.js, and visx are MIT or similar, and ECharts and Lightweight Charts are Apache 2.0. You can use all of these commercially at no cost, with no conditions.
Three libraries carry a custom license instead, and the terms differ enough that you should not lump them together:
- ApexCharts is published under a custom license (the source is public, but it is not MIT). It is free for non-commercial use and for companies under $2M in annual revenue; above that threshold, commercial use needs a paid license. In practice most teams use it for free, but you should not assume it is unconditionally open source. Full disclosure: this is our library, and we would rather state our own terms plainly than have you discover them later.
- Highcharts is free for personal and non-commercial projects only. Any commercial use requires a paid license, regardless of company size. "Free" is the wrong word for it in a business context.
- amCharts 5 is free to use only if you keep an attribution link on the chart. Removing the branding requires a commercial license.
If you are choosing a library for a commercial product and cost or licensing terms matter, this axis can decide the question on its own, independent of any technical merit. Check the license and, where there is a revenue threshold, check which side of it you are on.
The full comparison
Everything in one place. Downloads are last 30 days, stars and bundle size as of 7 July 2026. Bundle is the full gzipped build; "n/a" means bundlephobia could not size it (Plotly.js is over 1MB).
| Library | Downloads / mo | Stars | Bundle (gzip) | Engine | Framework | License |
|---|---|---|---|---|---|---|
| Recharts | 219.4M | 27.3k | 142 KB | SVG | React | Open source (MIT) |
| D3.js | 59.0M | 113.2k | 90 KB | SVG | Agnostic toolkit | Open source (ISC) |
| Chart.js | 54.0M | 67.5k | 67 KB | Canvas | Agnostic | Open source (MIT) |
| ECharts | 14.7M | 66.8k | 359 KB | Canvas | Agnostic | Open source (Apache 2.0) |
| Highcharts | 9.7M | 12.5k | 100 KB | SVG | Agnostic | Commercial (free non-commercial only) |
| ApexCharts | 7.8M | 15.1k | 164 KB | SVG | Agnostic | Custom (free under $2M revenue) |
| Nivo | 6.4M | 14.0k | 143 KB | SVG / Canvas | React | Open source (MIT) |
| Lightweight Charts | 3.1M | 16.5k | 60 KB | Canvas | Agnostic | Open source (Apache 2.0) |
| Plotly.js | 3.1M | 18.2k | n/a | SVG / WebGL | Agnostic | Open source (MIT) |
@visx/xychart | 1.6M | 20.9k | 49 KB | SVG | React | Open source (MIT) |
| Victory | 1.6M | 11.2k | 105 KB | SVG | React / RN | Open source (MIT) |
| amCharts 5 | 1.2M | 0.4k | 88 KB | Canvas | Agnostic | Commercial (free with attribution) |
| billboard.js | 0.2M | 6.0k | n/a | SVG | Agnostic | Open source (MIT) |
How to choose a charting library in 2026
Do not start from a popularity ranking. Start from your three real constraints, in this order.
| Your situation | Reach for |
|---|---|
| React app, want native-feeling components | Recharts (broadest), or Nivo / Victory / visx for more control |
| Any framework, or a multi-framework team | Chart.js, ECharts, ApexCharts, Highcharts, or Plotly with wrappers |
| Huge datasets or 3D | Plotly.js (WebGL) or a canvas library like ECharts |
| Financial time series specifically | Lightweight Charts, or ApexCharts / Highcharts for richer annotation |
| Hard bundle-size budget | A modular library (visx, Chart.js, ECharts) and measure your real import |
| Accessibility is a requirement | An SVG library with built-in semantics; see our audit |
| You need full low-level control | D3, accepting that you build the chart yourself |
| Commercial product, licensing matters | Confirm the license first; Highcharts and amCharts are not free for all uses |
The honest meta-point: for the data volumes most dashboards actually show (hundreds to low thousands of points), almost every library here performs fine, and the decision comes down to framework fit, license, and how much you want to build yourself versus get for free.
Where ApexCharts fits
Since this is our blog, here is our position stated as a position, not a verdict. ApexCharts is a framework-agnostic, SVG library with official React, Vue, and Angular wrappers, published under a custom license that is free for non-commercial use and for companies under $2M in annual revenue, with a commercial license above that. In this data it sits mid-field: 7.8M downloads and 15.1k stars put it among the established generalists, and its 164 KB full build reflects a batteries-included design, more chart types and interaction without opt-in wiring, rather than a minimal core.
That makes it a strong fit when you want a broad chart library that works across frameworks, renders crisp and accessible SVG, and is free for most teams to use, and it makes it the wrong choice when you need to render tens of thousands of points (reach for a canvas or WebGL library) or when you are shaving every last kilobyte (reach for a modular one). We think that is a fair place to be, and we would rather tell you the tradeoff than pretend it away.
Summary
JavaScript charting in 2026 is a mature field with no single winner. Chart.js leads deliberate adoption, Recharts leads within React (helped by transitive installs), D3 leads stars as the toolkit others build on, and ECharts is a heavyweight that is underrated in Western developer conversation. The decision that matters is not the ranking but the three axes underneath it: the rendering engine sets your data-volume ceiling and your accessibility floor, the framework model decides how native the charts feel and how portable they are, and the license can quietly rule a library out of a commercial product. Measure your real constraints against those three, and the right library for your case falls out of the data. We will refresh these numbers next year.
Methodology: npm point/last-month (6 June to 5 July 2026), GitHub stargazers_count and bundlephobia gzip sizes read 7 July 2026. Numbers change; treat them as a snapshot, not a constant.
Frequently asked questions
What is the most popular JavaScript charting library in 2026?
By direct installs, Chart.js is the most popular dedicated charting library, at 54.0M downloads a month. Recharts shows a higher raw number but it is inflated by transitive dependencies within the React ecosystem. D3 leads GitHub stars but is a low-level toolkit rather than a charting library.
Is D3 a charting library?
No. D3 is a low-level toolkit for binding data to the DOM and building visualizations from primitives. Several charting libraries, including Recharts, Victory, and billboard.js, are built on top of it. If you want ready-made charts, use one of those; if you want to build a custom visualization from scratch, use D3 directly.
Which JavaScript charting library has the smallest bundle size?
Among the libraries measured, @visx/xychart (about 49 KB gzipped) and Lightweight Charts (about 60 KB) are the smallest. But bundle size depends heavily on tree-shaking: modular libraries like ECharts and Chart.js ship far less than their full-build number if you import only what you use.
Is Highcharts free?
Not for commercial use. Highcharts is free for personal and non-commercial projects only; commercial use requires a paid license. amCharts 5 is free only if you keep an attribution link on the chart.
SVG or canvas: which should I choose?
It depends on data density and interaction. SVG libraries give crisp, interactive, accessible charts and handle up to a few thousand individual marks comfortably. Canvas and WebGL libraries handle far more data at a flat cost but are harder to make interactive and accessible. See our full breakdown in the SVG vs canvas for charts post.
Should I use a React-specific library or a framework-agnostic one?
Both work well in React. React-only libraries give you components written specifically for the framework, while framework-agnostic libraries ship official React wrappers (ApexCharts, Chart.js, ECharts, Highcharts, Plotly all do). If your team uses more than one framework, or you want a chart library that survives a framework migration, the agnostic option is the safer long-term choice because you are not tied to React.