Chart.js 4.6.1: Canvas-based charting with a narrow API and a wide ecosystem
GitHub describes it as Simple HTML5 Charts using the tag. The repository metadata lists JavaScript as its primary language. The metadata lists the MIT license. This article stays within the project description and details documented in the GitHub repository README.
At a glance
- What is it?
- Chart.js draws charts on a canvas element with a small, declarative API. Version 4.6.1 is the latest release, but the project's real strength is the extension ecosystem around it.
- Who is it for?
- Adopt Chart.js if you need a lightweight charting library for a web page and you can live within its canvas-based, declarative model. Do not adopt it if you need server-side rendering, complex custom interactions, or a chart type not covered by the built-in set or the extension list.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 7 days ago.
- What is it written in?
- Mainly JavaScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.
Star history
- chartjs/Chart.js67,795 ★ · +156
| Repository | 2026-08-13 | 2026-11-15 |
|---|---|---|
| chartjs/Chart.js | 67.6k | 67.8k |
156 Stars in the last 94 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
What Chart.js actually solves
Chart.js is a JavaScript library that renders charts inside an HTML5 canvas element. The problem it addresses is the gap between a raw canvas API, which requires manual drawing of every line and label, and a heavyweight charting suite that brings its own DOM or SVG model. For a developer who needs a line, bar, radar, or pie chart on a page without pulling in a large framework, Chart.js offers a compact, declarative interface. The README describes it as "Simple yet flexible JavaScript charting for designers & developers." It is not a dashboarding tool and it does not handle data fetching or layout. It draws what you give it, on a canvas, and then it stops.
The canvas mechanism and its trade-offs
The library renders to a canvas element, which means the output is a raster image. There is no SVG DOM to inspect, no CSS selectors for individual bars, and no accessibility tree generated by the library. The documentation points to the canvas tag as the rendering target, and that is the core architectural choice. A canvas approach gives you performance for large datasets because the browser does not maintain a DOM node per data point. It also means the chart is not directly styleable with CSS, and any tooltip or legend must be drawn by the library or overlaid by you. Chart.js provides built-in tooltips and legends, but they are canvas-drawn as well. If you need to attach event handlers to a specific bar or slice, you have to use the library's hit-testing or build your own. This is a limitation, not a bug. The trade-off is acceptable for static dashboards or embedded reports, but it becomes a problem if you want to integrate charts into a screen reader flow or a test that queries the DOM.
Getting it running: installation and first chart
The README directs you to the installation page for version 4. The typical path is to install the npm package `chart.js` or load it from a CDN. The documentation also mentions that for older versions you must specify the version in the URL, like `https://www.chartjs.org/docs/2.9.4/`. After installation, you create a chart by calling `new Chart(ctx, config)` where `ctx` is the 2D context of a canvas element and `config` is an object with `type`, `data`, and `options` keys. The README itself does not show code, but the samples page and the getting-started guide provide examples. The configuration object is the entire API surface: you set `type` to `'line'`, `'bar'`, `'pie'`, and so on, and you supply `labels` and `datasets` in the `data` object. The `options` key handles scales, tooltips, and animation. There is no separate template or markup language. This simplicity is the reason the library has survived this long, but it also means that complex layouts require you to compose multiple charts manually.
Version 4 and the maintenance cadence
The most recent releases are v4.5.1 (October 2025), then v4.6.0 and v4.6.1, both on 2026-10-22. The README explicitly notes that all documentation links point to version 4, and it warns that older docs are available only at versioned URLs. This is a practical point: if you are on an older version, you need to read the old docs, not the current ones. The project is not archived, and the last push (2026-10-23) came the day after v4.6.1, so maintenance is active. The MIT license is permissive, and the README points to a contributing guide and a CI workflow, which suggests a structured development process. There is no statement about long-term support or deprecation policy, so you should treat the current version as the supported line and plan upgrades accordingly.
Limitations and when it is the wrong tool
Chart.js is not the right choice for every charting need. The canvas rendering means no server-side rendering and no static image generation without a headless browser. If you need charts to be part of a server-rendered HTML document for SEO or email, Chart.js will not help because it requires JavaScript execution. The README does not mention any server-side mode. The library also does not include a data layer: you must fetch and transform data yourself. For real-time streaming charts, you would need to update the dataset and call `chart.update()`, but the library does not provide a websocket adapter. The extension ecosystem exists, and the README links to an `awesome` list, but those extensions are third-party and not all are maintained. If your chart type is not in the core set, you are dependent on that ecosystem. The documentation covers axes and configuration thoroughly, but the core library is deliberately small, so anything beyond the basics requires extra work.
Alternatives and how they differ
The most direct alternative is D3.js, which is not a charting library but a low-level toolkit for manipulating documents based on data. D3 works with SVG, HTML, and canvas, and it gives you complete control over every aspect of the chart. The difference in approach is fundamental: Chart.js gives you a chart with a configuration object, while D3 gives you building blocks with which you construct the chart. If you need a standard chart quickly, Chart.js wins. If you need a custom visualization that does not fit a standard type, D3 is the more flexible path, but it requires you to write the drawing logic. Another alternative is a commercial library like Highcharts, which renders in SVG and has a richer API for annotations and accessibility, but it is not open source and has licensing costs. Chart.js is open source under MIT, which is a decisive factor for many projects. The choice comes down to control versus convenience.
Maintenance, upgrade cost, and license
The MIT license is permissive: you can use, modify, and distribute the library without restriction, provided you include the license notice. The README links to the license file, and there is no mention of a CLA or contributor agreement. The README says older documentation lives at versioned URLs such as 2.9.4. If you are adopting Chart.js today, start with version 4 and ignore the old docs. The project's maintenance is active, and the README points to Stack Overflow for support questions. You are responsible for testing the library in your target browsers and for keeping up with minor releases. The release cadence suggests that minor versions are safe to adopt, but you should read the release notes for each new version.
Editorial conclusion
Adopt Chart.js if you need a lightweight charting library for a web page and you can live within its canvas-based, declarative model. Do not adopt it if you need server-side rendering, complex custom interactions, or a chart type not covered by the built-in set or the extension list. Before committing, verify that the chart types you need are available in the core library or in a maintained extension from the awesome list. The project is actively maintained, with a release in October 2026, and the MIT license removes most legal friction, but you are responsible for testing the canvas output in the browsers you support.
Frequently asked questions
What is Chart.js used for?
Chart.js draws charts on an HTML canvas element, described as simple HTML5 charts using the canvas tag and as flexible JavaScript charting for designers and developers. It ships as an ESM build, a CommonJS build and a UMD bundle for a CDN, and its documentation is organised into general, configuration, charts, axes and developers sections.
Is Chart.js still maintained?
The repository is not archived and the last push was on 2026-10-23. The newest published version is 4.6.1 from 2026-10-22, following 4.6.0 on the same day and 4.5.1 on 2025-10-13.
Is Chart.js available on npm?
Yes, the package is named chart.js at version 4.6.1 under the MIT license, and its metadata points the jsdelivr and unpkg fields at ./dist/chart.umd.min.js. The published files are the auto, dist and helpers directories, with the docs folder inside dist excluded, and the root, ./auto and ./helpers as the three allowed import paths.
how to install chart.js
The README prints no install command and sends you to the documentation, whose introduction and getting started pages live under /docs/latest/. The package manifest shows what a bundler will resolve once installed: the root entry, ./auto and ./helpers, each with types, import and require conditions.
how to use chart.js in html
The README contains no code sample, only the documentation index, and it notes that every link points to the new version 4 of the library. Runnable examples live on the project's samples page, and older documentation needs the version written into the URL, for example a 2.9.4 path.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/chartjs-chart-js)Star history chart for your README
[](https://hysenlabs.com/projects/chartjs-chart-js)Was this useful?