Pie and doughnut charts are divided into segments, where the arc of each segment shows the proportion of each data.
In Chart.js, these two charts are essentially the same. The only different value is the cutoutPercentage. This dataset class will work for either pie or doughtnut charts interchangably
Create a Pie dataset with just a label
Create a Pie dataset with a label and data
Set the data displayed by this dataset This is a list of floats, where each float is represented as an arc
Fill color of the arcs
Whether the borders of each arc should overlap or not Set to 'center' to overlap Set to 'inner' to not overlap
Color of the border
Width of the border
Fill color of the arcs when hovered
Border color of the arcs when hovered
Width of the border when hovered
For further information on these properties, see https://www.chartjs.org/docs/latest/charts/doughnut.html
You should not use the dataset type directly Instead use the updater pipeline functions: