Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to show labels above pie chart in chart.js

I am using chart.js and react-charts-2 in my React app to make Pie chart, how can I show labels name outside every section of pie chart like this:
Desired Outcome

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

you can checkout this plugin to display the labels outside pie chart in chartjs.

https://www.npmjs.com/package/chartjs-plugin-piechart-outlabels to add it in the react-charts-2 you can use its plugins prop.

Don’t know how to pass props then please checkout https://react-chartjs-2.netlify.app/components/pie#props to know how to pass props in Component.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading