[Chartjs]-Custom plugin chartAreaBorder is not the right type but it works

1👍

You need to extend the typing as explained here: https://www.chartjs.org/docs/4.2.0/developers/plugins.html#typescript-typings

import {ChartType, Plugin} from 'chart.js';

declare module 'chart.js' {
  interface PluginOptionsByType<TType extends ChartType> {
    chartAreaBorder?: {
      borderColor?: string,
      borderWidth?: string
    }
  }
}

Leave a comment