I'm working on a primeng chart and developing a doughnut chart along with angular. Now I need to show the text inside of the doughnut chart as per design . Like the image below
My HTML :
<p-chart
type="doughnut"
[data]="inspectionStorage"
[options]="doughnutOptions"
></p-chart>
My Component side code :
this.inspectionStorage = {
labels: ['Completed', 'Due', 'Pending', 'Deficient', 'Report'],
datasets: [
{
data: [],
backgroundColor: [
'green',
'#51087E',
'#ffd740',
'red',
'#5500FF',
],
},
],
};
this.doughnutOptions = {
responsive: true,
plugins: {
legend: {
position: 'right',
labels: {
boxWidth: 17,
boxHeight: 15,
color: '#000000',
},
},
},
};
But I could not get the exact way I expected the result. So , does anyone advise me on this issue?