0👍
✅
The tutorial method that I have tried must be outdated so I visited chart.js template from new issue page react-chartjs-2 sandbox (React)
I used this method instead of the code I have provided in this post:
Imports
import { Chart, registerables } from 'chart.js';
import { Chart as ReactChartJs } from 'react-chartjs-2';
Chart
<ReactChartJs type="pie" data={processedChartData} />
Source:stackexchange.com