Chartjs-Reading map and ForwardRef error in Chart.JS โ€“ Javascript

0๐Ÿ‘

โœ…

I had the same issue, to solve this read about migration to react-chartjs-2@4 here, that helped for me, I used the tree-shakable approach:

import { Chart } from 'react-chartjs-2';
import { Chart as ChartJS, LineController, LineElement, PointElement, LinearScale, Title } from 'chart.js';

ChartJS.register(LineController, LineElement, PointElement, LinearScale, Title);

<Chart type='line' data={chartData} />

Leave a comment