How to draw doughnut chart in ReactJs using the library reactchartjs-2
and chart.js
. The expected chart is something like below.
Asked
Active
Viewed 2,760 times
0

Tung
- 1,579
- 4
- 15
- 32

Ashish Prajapathi
- 23
- 1
- 4
-
Here is the answer: https://stackoverflow.com/questions/45446153/chartjs-round-borders-on-a-doughnut-chart-with-multiple-datasets – Alonas Dec 19 '20 at 13:00
-
how to implement that in react?? – Ashish Prajapathi Dec 19 '20 at 15:26
-
The code of plugin is the same as in the answer here https://stackoverflow.com/questions/45446153/chartjs-round-borders-on-a-doughnut-chart-with-multiple-datasets. To register plugin you do componentWillMount() { Chart.pluginService.register({ afterDraw: function (chart, easing) { // Plugin code. } }); } according to this https://github.com/reactchartjs/react-chartjs-2#chartjs-object – Alonas Dec 19 '20 at 22:39