Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

react-chartjs-2

> 前端框架
Open source

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

6.9K stars0 likes1 views
WebsiteGitHub

About

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

react-chartjs-2

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:

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:

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

<Doughnut data={...} />

Docs

  • Migration to v4
  • Working with datasets
  • Working with events
  • FAQ
  • Components
  • Examples

License

MIT Licensed Copyright (c) 2020 Jeremy Ayerst

Issues· 111 open

View all issuesOpen on GitHub
  • #993

    Dependency Dashboard

    Updated Sep 20, 2026
  • #1344

    [Bug]: Charts are auto-registered in develop build, but not in production build

    bugUpdated Apr 14, 2026
  • #1319

    [Bug]: Cannot find module 'node_modules/react/jsx-runtime

    bugUpdated Dec 9, 2025
  • #1169

    [Bug]: Responsive chart shrinks only

    bugUpdated Oct 21, 2025
  • #1280

    Combo Bar/Line Chart

    enhancementUpdated Sep 23, 2025
  • #1198

    [Bug]: A undifined canvas error occuring in react-native

    bugUpdated Feb 5, 2025
  • #1192

    [Bug]: Code sandbox for Scatter Chart on example website not working

    bugUpdated Jan 16, 2025
  • #1233

    [Bug]: Bar Chart with multiple dataset stacks reanimating when data changes

    bugUpdated Nov 6, 2024
  • #1212

    [Bug]:Chart display & scaling

    bugUpdated Oct 3, 2024
  • #1205

    [Bug]: Chart shakes during resize

    bugUpdated Jul 7, 2024

> Tags

TypeScriptchartcharting-librarychartjschartjs-2

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 22, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架