0👍
You will need to also install chart.js
and include this two line in your js file:
import Chart from "chart.js/auto";
import { CategoryScale } from "chart.js";
command to install:
npm install chart.js
- Chartjs-Chart js PHP and JSON wont diplsay
- Chartjs-How to show 2 populations types in one bar using chartjs?
0👍
Importing registerables
as follows solved the issue for me, it might be the same for you :
import { Chart, registerables } from 'chart.js';
Chart.register(...registerables);
- Chartjs-Edit tooltips in ChartJS
- Chartjs-React-chartjs – line chart displaying all datapoints, not just on hover
Source:stackexchange.com