From 1915e1d445095e485dae0ee378484d5e96c3c4e0 Mon Sep 17 00:00:00 2001 From: Jacco van den Berg <39033624+LeeLenaleee@users.noreply.github.com> Date: Tue, 7 Jun 2022 10:28:39 +0200 Subject: [PATCH 1/3] Add padding to pointLabelTypings and add type field to context --- types/index.esm.d.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/types/index.esm.d.ts b/types/index.esm.d.ts index 913baee9274..11da981c812 100644 --- a/types/index.esm.d.ts +++ b/types/index.esm.d.ts @@ -1349,6 +1349,7 @@ export interface ScriptableScalePointLabelContext { scale: Scale; index: number; label: string; + type: string; } @@ -3423,6 +3424,12 @@ 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 | string[] | number | number[]; + + /** + * Padding around the pointLabels + * @default 5 + */ + padding: ScriptableAndScriptableOptions; /** * if true, point labels are centered. From c53a8ef7ee7753f132aafdb1756b9c2a31ebeb63 Mon Sep 17 00:00:00 2001 From: Jacco van den Berg <39033624+LeeLenaleee@users.noreply.github.com> Date: Tue, 7 Jun 2022 10:29:58 +0200 Subject: [PATCH 2/3] Use correct scriptable helper --- types/index.esm.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/index.esm.d.ts b/types/index.esm.d.ts index 11da981c812..bcfcc6cac17 100644 --- a/types/index.esm.d.ts +++ b/types/index.esm.d.ts @@ -3429,7 +3429,7 @@ export type RadialLinearScaleOptions = CoreScaleOptions & { * Padding around the pointLabels * @default 5 */ - padding: ScriptableAndScriptableOptions; + padding: Scriptable; /** * if true, point labels are centered. From feaf569e8cc57906897029d1e504195ecc262a9f Mon Sep 17 00:00:00 2001 From: Jacco van den Berg <39033624+LeeLenaleee@users.noreply.github.com> Date: Tue, 7 Jun 2022 13:48:28 +0200 Subject: [PATCH 3/3] Remove trailing space --- types/index.esm.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/index.esm.d.ts b/types/index.esm.d.ts index bcfcc6cac17..d95c91fd12f 100644 --- a/types/index.esm.d.ts +++ b/types/index.esm.d.ts @@ -3424,7 +3424,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 | string[] | number | number[]; - + /** * Padding around the pointLabels * @default 5