]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Define bounds as a field common to all cartesian axes options (#9438)
authorFilip Borkiewicz <boreq@0x46.net>
Mon, 19 Jul 2021 17:06:12 +0000 (17:06 +0000)
committerGitHub <noreply@github.com>
Mon, 19 Jul 2021 17:06:12 +0000 (13:06 -0400)
Associated with #9437.

types/index.esm.d.ts

index 5e5b12f5e430f2c712875b0ed987dfb40b681744..80b3369141112d6793a93ec2a098f418f56abff3 100644 (file)
@@ -2830,6 +2830,15 @@ export interface TickOptions {
 }
 
 export interface CartesianScaleOptions extends CoreScaleOptions {
+  /**
+   * Scale boundary strategy (bypassed by min/max time options)
+   * - `data`: make sure data are fully visible, ticks outside are removed
+   * - `ticks`: make sure ticks are fully visible, data outside are truncated
+   * @since 2.7.0
+   * @default 'ticks'
+   */
+  bounds: 'ticks' | 'data';
+
   /**
    * Position of the axis.
    */