Skip to content

Commit

Permalink
allow for multiline labels in tick callback (#9937)
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeLenaleee committed Dec 5, 2021
1 parent 7784fbf commit d1daf1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions types/index.esm.d.ts
Expand Up @@ -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
Expand Down Expand Up @@ -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[];
};

/**
Expand Down

0 comments on commit d1daf1a

Please sign in to comment.