MCPcopy
hub / github.com/reactchartjs/react-chartjs-2

github.com/reactchartjs/react-chartjs-2 @v5.3.1 sqlite

repository ↗ · DeepWiki ↗ · release v5.3.1 ↗
84 symbols 272 edges 82 files 0 documented · 0%
README

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={...} />

Docs

License

MIT Licensed Copyright (c) 2020 Jeremy Ayerst

Extension points exported contracts — how you extend this code

ChartProps (Interface)
(no doc)
src/types.ts
IContext (Interface)
(no doc)
website/src/components/ContextProvider.tsx

Core symbols most depended-on inside this repo

createTypedChart
called by 8
src/typedCharts.tsx
setDatasets
called by 4
src/utils.ts
destroyChart
called by 3
src/chart.tsx
reforwardRef
called by 2
src/utils.ts
setLabels
called by 2
src/utils.ts
getDatasetAtEvent
called by 2
src/utils.ts
getElementAtEvent
called by 2
src/utils.ts
getElementsAtEvent
called by 2
src/utils.ts

Shape

Function 82
Interface 2

Languages

TypeScript100%

Modules by API surface

stories/Chart.stories.tsx11 symbols
website/src/theme/DocSidebar/index.js8 symbols
src/utils.ts8 symbols
stories/Pie.stories.tsx5 symbols
sandboxes/chart/events/App.tsx5 symbols
stories/Bar.stories.tsx4 symbols
website/src/components/PropsTable.tsx3 symbols
src/chart.tsx3 symbols
website/src/components/ContextProvider.tsx2 symbols
test/chart.test.tsx2 symbols
stories/Line.stories.tsx2 symbols
stories/Doughnut.stories.tsx2 symbols

Dependencies from manifests, versioned

@algolia/client-search5.0.0 · 1×
@commitlint/cli17.0.0 · 1×
@commitlint/config-conventional17.0.0 · 1×
@commitlint/cz-commitlint17.0.0 · 1×
@docusaurus/core3.9.1 · 1×
@docusaurus/module-type-aliases3.9.1 · 1×
@docusaurus/preset-classic3.9.1 · 1×
@docusaurus/theme-classic3.9.1 · 1×
@docusaurus/theme-common3.9.1 · 1×
@docusaurus/theme-search-algolia3.9.1 · 1×
@docusaurus/types3.9.1 · 1×
@mdx-js/react3.1.1 · 1×

For agents

$ claude mcp add react-chartjs-2 \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact