I am getting this error when I deployed my React app on Github "Error: "line" is not a registered controller."

Viewed 619
1 Answers

I found the way how to solve this issue. All I had to to do was import it from chart.js then import chart from "react-chartjs-2"

import {
  Chart as ChartJS,
  LinearScale,
  CategoryScale,
  BarElement,
  PointElement,
  LineElement,
  Legend,
  Tooltip,
  registerables as registerablesJS
} from "chart.js";
import { Chart} from "react-chartjs-2";
ChartJS.register(...registerablesJS);



ChartJS.register(
  LinearScale,
  CategoryScale,
  BarElement,
  PointElement,
  LineElement,
  Legend,
  Tooltip
);
Related