浏览 135
分享
PieChartA pie chart is a circular statistical graphic, which is divided into slices to illustrate numerical proportion.
piechartdemo.ts
export class PieChartDemo {
data: any;
constructor() {
this.data = {
labels: ['A','B','C'],
datasets: [
{
data: [300, 50, 100],
backgroundColor: [
"#FF6384",
"#36A2EB",
"#FFCE56"
],
hoverBackgroundColor: [
"#FF6384",
"#36A2EB",
"#FFCE56"
]
}]
};
}
}
piechartdemo.html
<p-chart type="pie" [data]="data"></p-chart>
评论列表