diff --git a/types/label.d.ts b/types/label.d.ts index 55a1747c8..c5cc688e3 100644 --- a/types/label.d.ts +++ b/types/label.d.ts @@ -39,7 +39,7 @@ export interface CalloutOptions { export interface CoreLabelOptions { drawTime?: Scriptable, - font?: FontSpec + font?: Scriptable, PartialEventContext>, color?: Scriptable, /** * Padding of label diff --git a/types/tests/exports.ts b/types/tests/exports.ts index 2f1508689..5cacbc570 100644 --- a/types/tests/exports.ts +++ b/types/tests/exports.ts @@ -25,13 +25,17 @@ const chart = new Chart('id', { drawTime: 'afterDraw', borderColor: 'red', label: { - display: true + display: true, + font: (ctx) => ({ size: 10 }) } }, annotations: [{ type: 'line', label: { - content: ['test', 'multiple'] + content: ['test', 'multiple'], + font: { + size: 10 + } } }, { type: 'box',