Skip to main content

Doughnut

Usage​

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

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

See full usage examples.

Props​

Also supports all standard <canvas> props.

NameTypeDefault ValueRequiredDescription
dataChartData<TType, TData, TLabel>YesThe data object that is passed into the Chart.js chart
See more
optionsChartOptions<TType>{}NoThe options object that is passed into the Chart.js chart
See more
pluginsPlugin<TType>[][]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
updateModeUpdateModeNoA mode string to indicate transition configuration should be used.
See more
refanyNo