I am trying to extend Chart.js, when I use the sample code given in the readme, which says:
import { Chart } from 'react-chartjs-2';
componentWillMount() {
Chart.pluginService.register({
afterDraw: function (chart, easing) {
// Plugin code.
}
});
}
I get the following error from VS Code:
Module '"react-chartjs-2"' has no exported member 'Chart'. Did you mean to use 'import Chart from "react-chartjs-2"' instead?
Using version "react-chartjs-2": "^2.11.1",
I ended up doing Import Chart from "chart.js";