Pie
Usage​
import { Pie } from 'react-chartjs-2';
<Pie
options={...}
data={...}
{...props}
/>
Props​
Also supports all standard <canvas>
props.
Name | Type | Default Value | Required | Description |
---|---|---|---|---|
data | ChartData<"pie", TData, TLabel> | Yes | The data object that is passed into the Chart.js chart See more | |
options | _DeepPartialObject<CoreChartOptions<"pie"> & ElementChartOptions<"pie"> & PluginChartOptions<"pie"> & DatasetChartOptions<"pie"> & ScaleChartOptions<...> & DoughnutControllerChartOptions> | {} | No | The options object that is passed into the Chart.js chart See more |
plugins | Plugin<"pie", AnyObject>[] | [] | No | The plugins array that is passed into the Chart.js chart See more |
redraw | boolean | false | No | Teardown and redraw chart on every update |
datasetIdKey | string | 'label' | No | Key name to identificate dataset |
fallbackContent | ReactNode | null | No | A fallback for when the canvas cannot be rendered. Can be used for accessible chart descriptions See more |
updateMode | "resize" | "reset" | "none" | "hide" | "show" | "default" | "active" | No | A mode string to indicate transition configuration should be used. See more | |
ref | ForwardedRef<Chart<"pie", TData, TLabel>> | No |