0👍
You are trying to import chartjs as treeshaking while importing from the auto package, this does not work. Changing your import and register to this will solve the issue:
import React from "react";
import { Line } from "react-chartjs-2";
import Chart from "chart.js/auto";
import zoomPlugin from "chartjs-plugin-zoom";
Chart.register(zoomPlugin)
- Chartjs-Chart.js – Line Chart Tooltip Labels
- Chartjs-Can't render two charts on the same page from chart.js
Source:stackexchange.com