react-chartjs-2

React components for Chart.js


Keywords
chart, chart-js, chart.js, react-chartjs-2, react chart.js, react-chart.js, charting-library, chartjs, chartjs-2, charts, data-visualization, datavis, datavisualization, dataviz-tools, react, reactjs, visualization
License
MIT
Install
npm install react-chartjs-2@5.2.0

Documentation

react-chartjs-2

Logo

React components for Chart.js, the most popular charting library.

Supports Chart.js v4 and v3.

NPM version Downloads Build status Coverage status Bundle size


Quickstart   •   Docs   •   Stack Overflow

Quickstart

Install this library with peer dependencies:

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:

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

<Doughnut data={...} />

Need an API to fetch data? Consider Cube, an open-source API for data apps.


supported by Cube

Docs

License

MIT Licensed Copyright (c) 2020 Jeremy Ayerst