]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Include `grace` in LinearScaleOptions type definition (#8847)
authorMoses Mendoza <mendoza.moses@gmail.com>
Thu, 8 Apr 2021 04:21:03 +0000 (21:21 -0700)
committerGitHub <noreply@github.com>
Thu, 8 Apr 2021 04:21:03 +0000 (07:21 +0300)
This commit adds the `grace` option, to the LinearScaleOptions type definition
as documented here,
https://www.chartjs.org/docs/latest/axes/cartesian/linear.html#grace. Without
this commit the TS compiler does not allow the option.

Signed-off-by: Moses Mendoza <mendoza.moses@gmail.com>
types/index.esm.d.ts

index 709b2034bb42c447848681454f00ebcdf66e69d8..4c3dde6923b9db4006d121883ce189d853ae1a7b 100644 (file)
@@ -2821,6 +2821,10 @@ export type LinearScaleOptions = CartesianScaleOptions & {
    * Adjustment used when calculating the minimum data value.
    */
   suggestedMax?: number;
+  /**
+  * Percentage (string ending with %) or amount (number) for added room in the scale range above and below data.
+  */
+  grace?: string | number;
 
   ticks: {
     /**