From d1daf1ac0894421ed852048f2c9a71c7b793632c Mon Sep 17 00:00:00 2001 From: Jacco van den Berg <39033624+LeeLenaleee@users.noreply.github.com> Date: Sun, 5 Dec 2021 14:57:44 +0100 Subject: [PATCH] allow for multiline labels in tick callback (#9937) --- types/index.esm.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/index.esm.d.ts b/types/index.esm.d.ts index 22d6a53a059..cb02b1c91aa 100644 --- a/types/index.esm.d.ts +++ b/types/index.esm.d.ts @@ -2851,7 +2851,7 @@ export interface TickOptions { /** * Returns the string representation of the tick value as it should be displayed on the chart. See callback. */ - callback: (this: Scale, tickValue: number | string, index: number, ticks: Tick[]) => string | number | null | undefined; + callback: (this: Scale, tickValue: number | string, index: number, ticks: Tick[]) => string | string[] | number | number[] | null | undefined; /** * If true, show tick labels. * @default true @@ -3302,7 +3302,7 @@ export type RadialLinearScaleOptions = CoreScaleOptions & { /** * Callback function to transform data labels to point labels. The default implementation simply returns the current string. */ - callback: (label: string, index: number) => string; + callback: (label: string, index: number) => string | string[] | number | number[]; }; /**