15๐
โ
You need to bind options to an object like this :
<p-chart type="doughnut" [data]="monthlyTeamCost" [options]="chartOptions"></p-chart>
Then in you TS File :
this.chartOptions = {
legend: {display: false}
}
Prime NG is a binding of Chart.JS (for charting part of the library), so you can found the exhaustive list of options in the Chart.JS web site : http://www.chartjs.org/docs/latest/
0๐
You can do like this.
HTML:
<p-chart type="horizontalBar" [data]="data" [options]="options"></p-chart>
In your TS file:
options = {
legend: {display: false}
}
0๐
options: {
plugins: {
legend: {display: false},
}
}
This is the solution.
Source:stackexchange.com