### Install Project Dependencies
Source: https://github.com/reactchartjs/react-chartjs-2/blob/master/website/README.md
Installs all necessary project dependencies using pnpm. Run this command after cloning the repository.
```bash
pnpm install
```
--------------------------------
### Install Dependencies with Yarn
Source: https://github.com/reactchartjs/react-chartjs-2/blob/master/website/docs/index.mdx
Install chart.js and react-chartjs-2 using Yarn.
```bash
yarn add chart.js react-chartjs-2
```
--------------------------------
### Install Dependencies with PNPM
Source: https://github.com/reactchartjs/react-chartjs-2/blob/master/website/docs/index.mdx
Install chart.js and react-chartjs-2 using PNPM.
```bash
pnpm add chart.js react-chartjs-2
```
--------------------------------
### Install Dependencies with NPM
Source: https://github.com/reactchartjs/react-chartjs-2/blob/master/website/docs/index.mdx
Install chart.js and react-chartjs-2 using NPM.
```bash
npm install --save chart.js react-chartjs-2
```
--------------------------------
### Start Local Development Server
Source: https://github.com/reactchartjs/react-chartjs-2/blob/master/website/README.md
Starts a local development server that automatically refreshes on code changes. Opens the website in your default browser.
```bash
pnpm start
```
--------------------------------
### Install react-chartjs-2 and chart.js
Source: https://github.com/reactchartjs/react-chartjs-2/blob/master/README.md
Install the library and its peer dependency chart.js using your preferred package manager. It is recommended to use chart.js version 4.0.0 or higher.
```bash
pnpm add react-chartjs-2 chart.js
```
```bash
yarn add react-chartjs-2 chart.js
```
```bash
npm i react-chartjs-2 chart.js
```
--------------------------------
### Basic Radar Chart Usage
Source: https://github.com/reactchartjs/react-chartjs-2/blob/master/website/docs/components/radar.mdx
Import and render the Radar component with necessary options and data. Ensure you have chart.js and react-chartjs-2 installed.
```jsx
import { Radar } from 'react-chartjs-2';
```
--------------------------------
### getDatasetAtEvent
Source: https://github.com/reactchartjs/react-chartjs-2/blob/master/website/docs/working-with-events.md
Gets dataset from mouse click event.
```APIDOC
## getDatasetAtEvent
### Description
Gets dataset from mouse click event.
### Usage
```jsx
import { useRef } from 'react';
import { Bar, getDatasetAtEvent } from 'react-chartjs-2';
function App() {
const chartRef = useRef();
const onClick = (event) => {
console.log(getDatasetAtEvent(chartRef.current, event));
}
return (
);
}
```
```
--------------------------------
### PolarArea Usage
Source: https://github.com/reactchartjs/react-chartjs-2/blob/master/website/docs/components/polar-area.mdx
Basic usage example of the PolarArea component. It accepts `options` and `data` props for chart configuration and data, along with any standard HTML canvas props.
```APIDOC
## PolarArea Component Usage
### Description
This component renders a polar area chart. It requires `data` and `options` props to define the chart's appearance and behavior. It also accepts standard HTML canvas attributes.
### Usage Example
```jsx
import { PolarArea } from 'react-chartjs-2';
```
### Props
- **options** (object) - Configuration options for the chart.
- **data** (object) - The data to be displayed in the chart.
- **{...props}** - Supports all standard `