DoughnutChartA doughnut chart is a variant of the pie chart, with a blank center allowing for additional information about the data as a whole to be included.
export class DoughnutChartDemo {
data: any;
constructor() {
this.data = {
labels: ['A','B','C'],
datasets: [
{
data: [300, 50, 100],
backgroundColor: [
"#FF6384",
"#36A2EB",
"#FFCE56"
],
hoverBackgroundColor: [
"#FF6384",
"#36A2EB",
"#FFCE56"
]
}]
};
}
}
doughnutchartdemo.html
<p-chart type="doughnut" [data]="data"></p-chart>