1
votes

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

1

1 Answers

0
votes

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.