9๐
โ
You can find example usages of chart.d.ts
in the form of a tests file right next to the definition in the DefinitelyTyped
repo.
3๐
A bit outdated question, but had similar request since Iโm working with Angular + PrimeNG (which uses chart.js
) with npm for packages.
Just install types from
npm i --save-dev @types/chart.js
and then use it for example:
import { Chart } from 'chart.js';
โฆ
const myOptions: Chart.ChartOptions = {
title: {
display: true,
text: 'My title',
fontSize: 16,
},
};
Might help someone.
Source:stackexchange.com