Closed nbamfordcirium closed 11 months ago
shouldn't it just be:
import { Chart } from "chart.js";
import ChartDataLabels from "chartjs-plugin-datalabels";
Chart.register(ChartDataLabels);
This is what I am doing in my codebase and it seems to be working.
@MasterCash is right, it should be Chart.register(ChartDataLabels);
References:
The following code:
produces the Typescript error
Property 'id' is missing in type 'typeof import("/Users/bamfordn/airframe-components/node_modules/chartjs-plugin-datalabels/types/index")' but required in type 'ChartComponent'.
I have the following versions in
package.json
: