Doughnut
Usage​
import { Doughnut } from 'react-chartjs-2';
<Doughnut
options={...}
data={...}
{...props}
/>
Props​
Also supports all standard <canvas>
props.
Name | Type | Default Value | Required | Description |
---|---|---|---|---|
data | ChartData<TType, TData, TLabel> | Yes | The data object that is passed into the Chart.js chart See more | |
options | ChartOptions<TType> | {} | No | The options object that is passed into the Chart.js chart See more |
plugins | Plugin<TType>[] | [] | 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 | UpdateMode | No | A mode string to indicate transition configuration should be used. See more | |
ref | any | No |