Skip to content

Commit 6e56ae6

Browse files
authored
Update types for indexAxis (#8389)
* Add indexAxis to CoreChartOptions * Update types for indexAxis
1 parent eb7ce4e commit 6e56ae6

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

types/index.esm.d.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ export interface ParsingOptions {
6363
}
6464

6565
export interface ControllerDatasetOptions extends ParsingOptions {
66+
/**
67+
* The base axis of the chart. 'x' for vertical charts and 'y' for horizontal charts.
68+
* @default 'x'
69+
*/
70+
indexAxis: 'x' | 'y';
6671
/**
6772
* 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}
6873
*/
@@ -86,11 +91,6 @@ export interface BarControllerDatasetOptions
8691
extends ControllerDatasetOptions,
8792
ScriptableAndArrayOptions<BarOptions, ScriptableContext>,
8893
ScriptableAndArrayOptions<CommonHoverOptions, ScriptableContext> {
89-
/**
90-
* The base axis of the dataset. 'x' for vertical bars and 'y' for horizontal bars.
91-
* @default 'x'
92-
*/
93-
indexAxis: 'x' | 'y';
9494
/**
9595
* The ID of the x axis to plot this dataset on.
9696
*/
@@ -1341,6 +1341,12 @@ export interface CoreChartOptions extends ParsingOptions {
13411341
animation: Scriptable<AnimationOptions | false, ScriptableContext>;
13421342
};
13431343

1344+
/**
1345+
* The base axis of the chart. 'x' for vertical charts and 'y' for horizontal charts.
1346+
* @default 'x'
1347+
*/
1348+
indexAxis: 'x' | 'y';
1349+
13441350
/**
13451351
* base color
13461352
* @see Defaults.color

0 commit comments

Comments
 (0)