Skip to main content

Pie

Usage​

import { Pie } from 'react-chartjs-2';

<Pie
options={...}
data={...}
{...props}
/>

See full usage examples.

Props​

Also supports all standard <canvas> props.

NameTypeDefault ValueRequiredDescription
dataChartData<"pie", TData, TLabel>YesThe data object that is passed into the Chart.js chart
See more
options_DeepPartialObject<CoreChartOptions<"pie"> & ElementChartOptions<"pie"> & PluginChartOptions<"pie"> & DatasetChartOptions<"pie"> & ScaleChartOptions<...> & DoughnutControllerChartOptions>{}NoThe options object that is passed into the Chart.js chart
See more
pluginsPlugin<"pie", AnyObject>[][]NoThe plugins array that is passed into the Chart.js chart
See more
redrawbooleanfalseNoTeardown and redraw chart on every update
datasetIdKeystring'label'NoKey name to identificate dataset
fallbackContentReactNodenullNoA 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"NoA mode string to indicate transition configuration should be used.
See more
refForwardedRef<Chart<"pie", TData, TLabel>>No