I successfully implemented a doughnut chart using the Chart.js plugin in Angular, as shown in the screenshot below.
https://i.sstatic.net/ADvOu.png
One problem I encountered is that when the dataset value drops below 100, it should automatically hide, like in the example below:
https://i.sstatic.net/ltsXw.png
If you'd like to view my complete code, feel free to check it out here.
I attempted to use a code snippet from this reference here, but unfortunately, it did not work as expected. The code I tried is:
pieChartData.data.forEach(function(ds) {
ds.hidden = !ds.hidden;
If anyone could help me troubleshoot and resolve this issue, it would be greatly appreciated.