📅  最后修改于: 2022-03-11 15:00:56.385000             🧑  作者: Mango
import 'chart.js/auto';
import { Chart } from 'react-chartjs-2';
// or
import { Chart } from 'react-chartjs-2';
import { Chart as ChartJS, LineController, LineElement, PointElement, LinearScale, Title } from 'chart.js';
ChartJS.register(LineController, LineElement, PointElement, LinearScale, Title);