score:1

Accepted answer

this can be done using the plugin 'chartjs-plugin-labels'. there is a option to show the label outside of the pie section in this plugin. the calculation is done to show the label in the center of the pie section(outside the chart). i modified the calculation to show the label at the end of the pie section.

link for plugin

score:1

this plugin chartjs-plugin-piechart-outlabels worked for me.

step 1: npm install it https://www.npmjs.com/package/chartjs-plugin-piechart-outlabels.

step 2: if using angular framework import it in your components module like this import chartjs-plugin-piechart-outlabels.

step 3: customize as required https://piechart-outlabels.netlify.app/options


Related Query

More Query from same tag