adrianhajdin / speechly_expense_tracker_project

This is a code repository for the corresponding video tutorial
https://youtu.be/NnUFOWR_V4Y
324 stars 125 forks source link

Got an error while implementing Doughnut chart #9

Open AkankshaGawade opened 1 year ago

AkankshaGawade commented 1 year ago

error:"arc" is not a registered element. Tried many solutions but still it doesn't resolved. Can anyone help, please?

Aqs31 commented 11 months ago

in terminal : npm install --save chart.js react-chartjs-2 header file : import { Chart as ChartJS, ArcElement, Tooltip, Legend } from "chart.js"; import { Doughnut } from "react-chartjs-2";

inside the function ..above the return statement : (ChartJS.register(ArcElement, Tooltip, Legend);)

rayon1990 commented 4 days ago

in terminal : npm install --save chart.js react-chartjs-2 header file : import { Chart as ChartJS, ArcElement, Tooltip, Legend } from "chart.js"; import { Doughnut } from "react-chartjs-2";

inside the function ..above the return statement : (ChartJS.register(ArcElement, Tooltip, Legend);)

What was the issue? @AkankshaGawade Did you manage to fix it?