# react-chartjs-2

> React components for Chart.js

Latest version **5.3.1** (published 2025-10-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-chartjs-2
pnpm add react-chartjs-2
yarn add react-chartjs-2
bun add react-chartjs-2
```

## Health

**Score 60/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 5.3.1 |
| Published | 2025-10-27 |
| First published | 2016-05-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 53.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6940 |
| Author | Jeremy Ayerst |
| Maintainers | dangreen, gor181, jerairrest, igorlukanin |
| Keywords | chart, chart-js, chart.js, react-chartjs-2, react chart.js, react-chart.js |

## Links

- npm: https://www.npmjs.com/package/react-chartjs-2
- Repository: https://github.com/reactchartjs/react-chartjs-2
- Issues: https://github.com/reactchartjs/react-chartjs-2/issues
- npm.io page: https://npm.io/package/react-chartjs-2

## Alternatives

- [d3-force-3d](https://npm.io/package/d3-force-3d.md) — 1.0M weekly downloads
- [ng2-charts](https://npm.io/package/ng2-charts.md) — 486.8K weekly downloads
- [@arcgis/core](https://npm.io/package/@arcgis/core.md) — 257.8K weekly downloads
- [react-sparklines](https://npm.io/package/react-sparklines.md) — 249.3K weekly downloads
- [react-native-gifted-charts](https://npm.io/package/react-native-gifted-charts.md) — 182.3K weekly downloads

## Recent versions

- 5.3.1 (latest) — 2025-10-27
- 5.3.0 — 2025-01-01
- 5.2.0 — 2023-01-09
- 5.1.0 — 2022-12-19
- 5.0.1 — 2022-11-17
- 5.0.0 — 2022-11-17
- 4.3.1 — 2022-07-13
- 4.3.0 — 2022-07-12
- 4.2.0 — 2022-06-07
- 4.1.0 — 2022-04-07
- 4.0.1 — 2022-01-19
- 4.0.0 — 2021-11-22
- 3.3.0 — 2021-10-26
- 3.2.0 — 2021-10-21
- 3.1.1 — 2021-10-19
- … 71 more at https://npm.io/package/react-chartjs-2/versions

## README

# react-chartjs-2

<img align="right" width="150" height="150" alt="Logo" src="website/static/img/logo.svg">

React components for <a href="https://www.chartjs.org">Chart.js</a>, the most popular charting library.

Supports Chart.js v4 and v3.

[![NPM version][npm]][npm-url]
[![Downloads][downloads]][downloads-url]
[![Build status][build]][build-url]
[![Coverage status][coverage]][coverage-url]
[![Bundle size][size]][size-url]

[npm]: https://img.shields.io/npm/v/react-chartjs-2.svg
[npm-url]: https://www.npmjs.com/package/react-chartjs-2

[downloads]: https://img.shields.io/npm/dm/react-chartjs-2.svg
[downloads-url]: https://www.npmjs.com/package/react-chartjs-2

[build]: https://img.shields.io/github/actions/workflow/status/reactchartjs/react-chartjs-2/ci.yml?branch=master
[build-url]: https://github.com/reactchartjs/react-chartjs-2/actions

[coverage]: https://img.shields.io/codecov/c/github/reactchartjs/react-chartjs-2.svg
[coverage-url]: https://app.codecov.io/gh/reactchartjs/react-chartjs-2

[size]: https://img.shields.io/bundlephobia/minzip/react-chartjs-2
[size-url]: https://bundlephobia.com/package/react-chartjs-2

<br />
<a href="#quickstart">Quickstart</a>
<span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
<a href="#docs">Docs</a>
<span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
<a href="https://stackoverflow.com/questions/tagged/react-chartjs-2">Stack Overflow</a>
<br />
<hr />

## Quickstart

Install this library with peer dependencies:

```bash
pnpm add react-chartjs-2 chart.js
# or
yarn add react-chartjs-2 chart.js
# or
npm i react-chartjs-2 chart.js
```

We recommend using `chart.js@^4.0.0`.

Then, import and use individual components:

```jsx
import { Doughnut } from 'react-chartjs-2';

<Doughnut data={...} />
```

## Docs

- [Migration to v4](https://react-chartjs-2.js.org/docs/migration-to-v4)
- [Working with datasets](https://react-chartjs-2.js.org/docs/working-with-datasets)
- [Working with events](https://react-chartjs-2.js.org/docs/working-with-events)
- [FAQ](https://react-chartjs-2.js.org/faq)
- [Components](https://react-chartjs-2.js.org/components)
- [Examples](https://react-chartjs-2.js.org/examples)

## License

[MIT Licensed](LICENSE)
Copyright (c) 2020 Jeremy Ayerst

---
_Source: https://npm.io/package/react-chartjs-2 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
