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
CodePudding user response:
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.