]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Add stepSize option to time scale options types (#10910)
authorstockiNail <stocki.nail@gmail.com>
Thu, 24 Nov 2022 12:47:17 +0000 (13:47 +0100)
committerGitHub <noreply@github.com>
Thu, 24 Nov 2022 12:47:17 +0000 (07:47 -0500)
types/index.d.ts
types/tests/scales/options.ts

index 986b1cfec51641828f3e3618ccfd07dbd05daff5..435d6bdb48927d20223798569a10d1a6d98f3f02 100644 (file)
@@ -3250,6 +3250,11 @@ export type TimeScaleOptions = Omit<CartesianScaleOptions, 'min' | 'max'> & {
      * @default 'auto'
      */
     source: 'labels' | 'auto' | 'data';
+    /**
+     * The number of units between grid lines.
+     * @default 1
+     */
+    stepSize: number;
   };
 };
 
index 3b545d4e13a97b87e80330755b76c7e043cb25a8..086435b6e7bd014e5bc958994ed97a6d33893e86 100644 (file)
@@ -17,6 +17,9 @@ const chart = new Chart('test', {
         type: 'time',
         time: {
           unit: 'year'
+        },
+        ticks: {
+          stepSzie: 1
         }
       },
       x1: {