i looked at the source of the plugin and it seems like even if you solve the typing issue it wont work. the reason for this is that you are using v3 of chart.js while the plugin was written for v2 and never updated. it is self registering and it does this in the wrong way, it defines its default options in the wrong place (both namespaces dont exist anymore).

so if you really want to use this plugin i suggest you take a look at the source and modify it so it works with v3 or downgrade to chart.js v2 where there is no build in typing or find another plugin.


it turns out the typing error can be solved by using any instead of chartoptions.

const options: any = {

as leelenalee pointed out, there is also an issue using this specific plugin with v3 of chart.js, but using any worked with another similar plugin.


types are exported from chart.js

import type { chartdata, chartoptions } from 'chart.js';

interface doughnutprops {
  options: chartoptions<'doughnut'>;
  data: chartdata<'doughnut'>;

Related Query

More Query from same tag