Caution
This is not an actively maintained fork of react-chartjs-2
. However, it may be useful for anybody looking to maintain their own fork. This fork preserves the original src/
directory while replacing everything else with an entirely new React TypeScript project. Also, it has React 19 as a peer dependency and builds without errors.
For more information, see:
React components for Chart.js, the most popular charting library.
Install this library with peer dependencies:
Note
I haven't published this library to npm yet, so the installation command below will not work.
npm i react-chartjs-3 chart.js
We recommend using chart.js@^4.0.0
.
Then, import and use individual components:
import { Doughnut } from 'react-chartjs-3';
<Doughnut data={...} />
This repository is a fork of reactchartjs/react-chartjs-2, which is licensed under the MIT License and copyrighted by Jeremy Ayerst in 2017.
This fork continues to use the MIT License. Modifications to this repository were made starting with this commit in 2024 by Christopher Kumm.