Chartjs-The Chart.JS Won't Show In The Browser

0👍

You need to install chart.js too, also you need to register them like this:

import { Chart as ChartJS, ArcElement, Tooltip, Legend } from "chart.js";
import { Doughnut } from "react-chartjs-2";

ChartJS.register(ArcElement, Tooltip, Legend);

<Doughnut data={...} />

Check the docs here

Leave a comment