]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Update types for indexAxis (#8389)
authorJukka Kurkela <jukka.kurkela@gmail.com>
Fri, 5 Feb 2021 22:39:45 +0000 (00:39 +0200)
committerGitHub <noreply@github.com>
Fri, 5 Feb 2021 22:39:45 +0000 (17:39 -0500)
* Add indexAxis to CoreChartOptions
* Update types for indexAxis

types/index.esm.d.ts

index 5b414f99ab2bdb29e6c2a877b1b409339eb4b9ec..581db43d344aa3205fb114672a956dd9dca09200 100644 (file)
@@ -63,6 +63,11 @@ export interface ParsingOptions {
 }
 
 export interface ControllerDatasetOptions extends ParsingOptions {
+       /**
+        * The base axis of the chart. 'x' for vertical charts and 'y' for horizontal charts.
+        * @default 'x'
+        */
+       indexAxis: 'x' | 'y';
        /**
         * How to clip relative to chartArea. Positive value allows overflow, negative value clips that many pixels inside chartArea. 0 = clip at chartArea. Clipping can also be configured per side: clip: {left: 5, top: false, right: -2, bottom: 0}
         */
@@ -86,11 +91,6 @@ export interface BarControllerDatasetOptions
        extends ControllerDatasetOptions,
                ScriptableAndArrayOptions<BarOptions, ScriptableContext>,
                ScriptableAndArrayOptions<CommonHoverOptions, ScriptableContext> {
-       /**
-        * The base axis of the dataset. 'x' for vertical bars and 'y' for horizontal bars.
-        * @default 'x'
-        */
-       indexAxis: 'x' | 'y';
        /**
         * The ID of the x axis to plot this dataset on.
         */
@@ -1341,6 +1341,12 @@ export interface CoreChartOptions extends ParsingOptions {
                animation: Scriptable<AnimationOptions | false, ScriptableContext>;
        };
 
+       /**
+        * The base axis of the chart. 'x' for vertical charts and 'y' for horizontal charts.
+        * @default 'x'
+        */
+       indexAxis: 'x' | 'y';
+
        /**
         * base color
         * @see Defaults.color