chartjs-plugin-doughnutlabel-v3
Version:
Chart.js (Version 3) Doughnut Chart plugin to display custom lines of text in the center of the donut.
25 lines (20 loc) • 470 B
TypeScript
import { Chart, ChartComponent, Color, FontSpec } from 'chart.js';
export type Font = {
lineHeight: number;
string: string;
} & FontSpec;
export type LabelText = ((chart: Chart) => string) | string;
export interface LabelOptions {
text: LabelText;
font: Font;
color: Color;
}
interface foo {
yo: string;
}
export interface Options extends LabelOptions {
/**
* There can be multiple labels.
*/
labels?: LabelOptions[];
}