]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Add missing resizeDelay option to types (#9403)
authorDrew J. Sonne <drew.sonne@gmail.com>
Tue, 13 Jul 2021 17:43:21 +0000 (18:43 +0100)
committerGitHub <noreply@github.com>
Tue, 13 Jul 2021 17:43:21 +0000 (13:43 -0400)
This option is defined in the documentation (https://www.chartjs.org/docs/master/configuration/responsive.html) and the native js code, but not listed in the types. This allows its use in typescript.

types/index.esm.d.ts

index 8f95af2529dab31b7bc48fd71cbcf5ee4efc2bc4..5e5b12f5e430f2c712875b0ed987dfb40b681744 100644 (file)
@@ -1412,6 +1412,11 @@ export interface CoreChartOptions<TType extends ChartType> extends ParsingOption
    * @default true
    */
   maintainAspectRatio: boolean;
+  /**
+   * Delay the resize update by give amount of milliseconds. This can ease the resize process by debouncing update of the elements.
+   * @default 0
+   */
+  resizeDelay: number;
 
   /**
    * Canvas aspect ratio (i.e. width / height, a value of 1 representing a square canvas). Note that this option is ignored if the height is explicitly defined either as attribute or via the style.