Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "react-chartjs-2",
"type": "module",
"version": "6.0.0",
"description": "React components for Chart.js.",
"description": "React components for Chart.js, the most popular charting library.",
"author": "Jeremy Ayerst",
"license": "MIT",
"homepage": "https://react-chartjs-2.js.org",
Expand All @@ -15,12 +15,28 @@
"url": "https://github.com/reactchartjs/react-chartjs-2/issues"
},
"keywords": [
"react",
"react-component",
"chart",
"chart-js",
"charts",
"charting",
"chart.js",
"chartjs",
"chart-js",
"react-chartjs-2",
"react chart.js",
"react-chart.js"
"react-chart.js",
"graph",
"visualization",
"data-visualization",
"bar-chart",
"line-chart",
"pie-chart",
"doughnut-chart",
"polar-area-chart",
"radar-chart",
"scatter-chart",
"bubble-chart"
],
"sideEffects": false,
"types": "./dist/index.d.ts",
Expand Down
51 changes: 51 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions website/astro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export default defineConfig({
PageSidebar: './src/components/PageSidebar.astro',
Footer: './src/components/Footer.astro'
},
routeMiddleware: './src/routeData.ts',
plugins: [
llmsTxt({
projectName: 'react-chartjs-2',
Expand Down
7 changes: 7 additions & 0 deletions website/oxlint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ export default defineConfig({
'eslint/no-implicit-globals': 'off'
}
},
{
// The design of the social images: colors and sizes are data
files: ['src/pages/og/**'],
rules: {
'eslint/no-magic-numbers': 'off'
}
},
{
// Served as is: a classic service worker script, not a module
files: ['public/**'],
Expand Down
3 changes: 3 additions & 0 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@
"@astrojs/check": "^0.9.12",
"@astrojs/markdown-remark": "^7.3.10",
"@astrojs/starlight": "^0.43.2",
"@fontsource/inter": "^5.3.0",
"astro": "^7.4.13",
"astro-og-canvas": "^0.13.3",
"canvaskit-wasm": "^0.42.0",
"react-docgen-typescript": "^2.4.0",
"starlight-llms-txt": "^0.12.0"
},
Expand Down
Binary file added website/src/assets/og-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion website/src/content/docs/components/bar.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: "Bar"
description: "Description of Bar component from react-chartjs-2."
description: "The Bar component of react-chartjs-2 renders a Chart.js bar chart in React: vertical, horizontal, stacked or grouped. See how to use it, its props and examples."
head:
- tag: title
content: "Bar: React Bar Chart Component | react-chartjs-2"
---

import PropsTable from '../../../components/PropsTable.astro'
Expand Down
5 changes: 4 additions & 1 deletion website/src/content/docs/components/bubble.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: "Bubble"
description: "Description of Bubble component from react-chartjs-2."
description: "The Bubble component of react-chartjs-2 renders a Chart.js bubble chart in React. See how to use it, its props and an example."
head:
- tag: title
content: "Bubble: React Bubble Chart Component | react-chartjs-2"
next: false
---

Expand Down
5 changes: 4 additions & 1 deletion website/src/content/docs/components/chart.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: "Chart"
description: "Description of Chart component from react-chartjs-2."
description: "The Chart component of react-chartjs-2 renders a Chart.js chart of any type in React, mixed charts included. See how to use it, its props and examples."
head:
- tag: title
content: "Chart: React Component for Any Chart Type | react-chartjs-2"
prev: Components
---

Expand Down
5 changes: 4 additions & 1 deletion website/src/content/docs/components/doughnut.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: "Doughnut"
description: "Description of Doughnut component from react-chartjs-2."
description: "The Doughnut component of react-chartjs-2 renders a Chart.js doughnut chart in React. See how to use it, its props and an example."
head:
- tag: title
content: "Doughnut: React Doughnut Chart Component | react-chartjs-2"
---

import PropsTable from '../../../components/PropsTable.astro'
Expand Down
5 changes: 4 additions & 1 deletion website/src/content/docs/components/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: "Components"
description: "List of react-chartjs-2 components."
description: "react-chartjs-2 has a Chart component for any Chart.js chart and typed components for bar, line, pie, doughnut, polar area, radar, scatter and bubble charts."
head:
- tag: title
content: "React Chart Components | react-chartjs-2"
prev: false
---

Expand Down
5 changes: 4 additions & 1 deletion website/src/content/docs/components/line.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: "Line"
description: "Description of Line component from react-chartjs-2."
description: "The Line component of react-chartjs-2 renders a Chart.js line chart in React, area and multi-axis charts included. See how to use it, its props and examples."
head:
- tag: title
content: "Line: React Line Chart Component | react-chartjs-2"
---

import PropsTable from '../../../components/PropsTable.astro'
Expand Down
5 changes: 4 additions & 1 deletion website/src/content/docs/components/pie.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: "Pie"
description: "Description of Pie component from react-chartjs-2."
description: "The Pie component of react-chartjs-2 renders a Chart.js pie chart in React. See how to use it, its props and an example."
head:
- tag: title
content: "Pie: React Pie Chart Component | react-chartjs-2"
---

import PropsTable from '../../../components/PropsTable.astro'
Expand Down
5 changes: 4 additions & 1 deletion website/src/content/docs/components/polar-area.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: "PolarArea"
description: "Description of PolarArea component from react-chartjs-2."
description: "The PolarArea component of react-chartjs-2 renders a Chart.js polar area chart in React. See how to use it, its props and an example."
head:
- tag: title
content: "PolarArea: React Polar Area Chart Component | react-chartjs-2"
---

import PropsTable from '../../../components/PropsTable.astro'
Expand Down
5 changes: 4 additions & 1 deletion website/src/content/docs/components/radar.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: "Radar"
description: "Description of Radar component from react-chartjs-2."
description: "The Radar component of react-chartjs-2 renders a Chart.js radar chart in React. See how to use it, its props and an example."
head:
- tag: title
content: "Radar: React Radar Chart Component | react-chartjs-2"
---

import PropsTable from '../../../components/PropsTable.astro'
Expand Down
5 changes: 4 additions & 1 deletion website/src/content/docs/components/scatter.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: "Scatter"
description: "Description of Scatter component from react-chartjs-2."
description: "The Scatter component of react-chartjs-2 renders a Chart.js scatter chart in React. See how to use it, its props and an example."
head:
- tag: title
content: "Scatter: React Scatter Chart Component | react-chartjs-2"
---

import PropsTable from '../../../components/PropsTable.astro'
Expand Down
2 changes: 1 addition & 1 deletion website/src/content/docs/docs/chartjs-v2.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Using with Chart.js v2"
description: "Using react-chartjs-2 with Chart.js v2"
description: "Install the react-chartjs-2 version that works with Chart.js v2, or upgrade to Chart.js v3 and react-chartjs-2 v4."
next: false
---

Expand Down
2 changes: 1 addition & 1 deletion website/src/content/docs/docs/chartjs-v3.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Using with Chart.js v3"
description: "Using react-chartjs-2 with Chart.js v3"
description: "Install the react-chartjs-2 version that works with Chart.js v3, or upgrade to Chart.js v4 and react-chartjs-2 v5."
---

import { Tabs, TabItem } from '@astrojs/starlight/components'
Expand Down
2 changes: 1 addition & 1 deletion website/src/content/docs/docs/migration-to-v4.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Migration to v4"
description: "react-chartjs-2 migration guide to v4"
description: "Migrate to react-chartjs-2 v4 for Chart.js v3: new exports, tree-shaking, gradients without a data function and helpers for click events."
---

With v4, this library introduces a number of breaking changes. In order to improve performance, offer new features, and improve maintainability, it was necessary to break backwards compatibility, but we aimed to do so only when worth the benefit.
Expand Down
2 changes: 1 addition & 1 deletion website/src/content/docs/docs/migration-to-v5.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Migration to v5"
description: "react-chartjs-2 migration guide to v5"
description: "Migrate to react-chartjs-2 v5 for Chart.js v4: v5.0 is ESM only, and v5.1 supports CommonJS again."
---

## v5.0
Expand Down
2 changes: 1 addition & 1 deletion website/src/content/docs/docs/working-with-datasets.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Working with datasets"
description: "Working with datasets in react-chartjs-2"
description: "Keep the datasets of a react-chartjs-2 chart from merging on updates: give each dataset a label, or a key of your own with the datasetIdKey prop."
---

You will find that any event which causes the chart to re-render, such as hover tooltips, etc., will cause the first dataset to be copied over to other datasets, causing your lines and bars to merge together.
Expand Down
2 changes: 1 addition & 1 deletion website/src/content/docs/docs/working-with-events.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Working with events"
description: "Working with events in react-chartjs-2"
description: "Get the dataset or the elements under a click on a react-chartjs-2 chart with the getDatasetAtEvent, getElementAtEvent and getElementsAtEvent helpers."
---

There are three helper methods to get data from click event.
Expand Down
5 changes: 4 additions & 1 deletion website/src/content/docs/examples/area-chart.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: "Area Chart"
description: "Example of area chart in react-chartjs-2."
description: "An area chart in React with react-chartjs-2 and Chart.js: a line chart with the area under the line filled. See it live and edit it in StackBlitz."
head:
- tag: title
content: "React Area Chart Example | react-chartjs-2"
---

import Example from '../../../components/Example.astro'
Expand Down
5 changes: 4 additions & 1 deletion website/src/content/docs/examples/bubble-chart.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
title: "Bubble Chart"
description: "Example of bubble chart in react-chartjs-2."
description: "A bubble chart in React with react-chartjs-2 and Chart.js: two datasets of points with x, y and a radius. See it live and edit it in StackBlitz."
head:
- tag: title
content: "React Bubble Chart Example | react-chartjs-2"
---

import Example from '../../../components/Example.astro'
Expand Down
Loading