import { Chart as ChartJS } from 'chart.js'; import type { ActiveElement, ChartType, Plugin } from 'chart.js'; export interface CenterLabel { label: string; bold?: boolean; } export interface Selected { datasetIndex?: number; index: number; } export interface CenterLabelConfig { defaultText: CenterLabel[]; selected: Selected; onRenderLabel(chart: ChartJS, chartItems: ActiveElement[]): CenterLabel[] | undefined; } declare module 'chart.js' { interface PluginOptionsByType { centerLabel?: CenterLabelConfig; } } declare const plugins: Plugin; export { plugins as doughnutCenterLabelPlugin };