Add padding to pointLabels type, add type to scriptable context (#10404)

* Add padding to pointLabelTypings and add type field to context

* Use correct scriptable helper

* Remove trailing space
This commit is contained in:
Jacco van den Berg 2022-06-07 14:59:41 +02:00 committed by GitHub
parent a0609d77ff
commit f796c7b475
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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