Skip to content

reactchartjs/react-chartjs-2

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
December 19, 2022 15:09
November 16, 2022 15:11
August 30, 2023 16:45
January 19, 2022 21:35
October 13, 2021 03:50
January 10, 2023 01:54
February 18, 2022 18:24
October 7, 2020 22:42
August 30, 2023 16:44
January 10, 2023 01:54

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