Accepted answer

You can find example usages of chart.d.ts in the form of a tests file right next to the definition :


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.

Related Query

More Query from same tag