所以我想在我的饼图中隐藏我的传奇,因为52个标签占用了太多空间,但我找不到在primeNG中做到这一点的方法.
我的代码:
chart.component.html
<p-chart type="doughnut" [data]="monthlyTeamCost"></p-chart>
Run Code Online (Sandbox Code Playgroud)
我的component.ts中的声明
this.monthlyTeamCost = {
labels: team,
options: {labels: {display: false}},
datasets: [
{
data: amount,
backgroundColor: colorArr,
}],
};
Run Code Online (Sandbox Code Playgroud)
因此,所有数据都很好,只需要隐藏标签.提前致谢