Skip to content

Commit

Permalink
Include grace in LinearScaleOptions type definition (#8847)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
MosesMendoza committed Apr 8, 2021
1 parent 6c7bf22 commit efc1902
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions types/index.esm.d.ts
Expand Up @@ -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: {
/**
Expand Down

0 comments on commit efc1902

Please sign in to comment.