]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Add padding to pointLabels type, add type to scriptable context (#10404)
authorJacco van den Berg <39033624+LeeLenaleee@users.noreply.github.com>
Tue, 7 Jun 2022 12:59:41 +0000 (14:59 +0200)
committerGitHub <noreply@github.com>
Tue, 7 Jun 2022 12:59:41 +0000 (15:59 +0300)
* Add padding to pointLabelTypings and add type field to context

* Use correct scriptable helper

* Remove trailing space

types/index.esm.d.ts

index 913baee9274e82f8e1ec7c01866bd44a9071d6a0..d95c91fd12f5edeb6d3aaf71a7b81440a047f20f 100644 (file)
@@ -1349,6 +1349,7 @@ export interface ScriptableScalePointLabelContext {
   scale: Scale;
   index: number;
   label: string;
+  type: string;
 }
 
 
@@ -3424,6 +3425,12 @@ export type RadialLinearScaleOptions = CoreScaleOptions & {
      */
     callback: (label: string, index: number) => string | string[] | number | number[];
 
+    /**
+     * Padding around the pointLabels
+     * @default 5
+     */
+    padding: Scriptable<number, ScriptableScalePointLabelContext>;
+
     /**
      * if true, point labels are centered.
      * @default false