Skip to content

Commit

Permalink
fix: add indicatorKeys slice in getAxisRange()
Browse files Browse the repository at this point in the history
  • Loading branch information
Rui-Sun committed Nov 7, 2024
1 parent f3dde64 commit cd53c18
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/vtable/src/layout/chart-helper/get-axis-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export function getAxisConfigInPivotChart(col: number, row: number, layout: Pivo
col >= layout.rowHeaderLevelCount &&
col < layout.colCount - layout.rightFrozenColCount
) {
const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, row);
const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, row).slice(0, 2);
let indicatorInfo = null;
indicatorKeys?.forEach(key => {
const info = layout.getIndicatorInfo(key);
Expand Down Expand Up @@ -220,7 +220,7 @@ export function getAxisConfigInPivotChart(col: number, row: number, layout: Pivo
row >= layout.columnHeaderLevelCount &&
row < layout.rowCount - layout.bottomFrozenRowCount
) {
const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, row);
const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, row).slice(0, 2);
let indicatorInfo = null;
indicatorKeys?.forEach(key => {
const info = layout.getIndicatorInfo(key);
Expand Down Expand Up @@ -567,7 +567,7 @@ function getRange(
if (axisOption?.visible === false) {
return undefined;
}
const indicatorKeys = layout.getIndicatorKeyInChartSpec(colForIndicatorKey, rowForIndicatorKey);
const indicatorKeys = layout.getIndicatorKeyInChartSpec(colForIndicatorKey, rowForIndicatorKey).slice(0, 2);
let path;
if (position === 'top' || position === 'bottom') {
path = layout.getColKeysPath(col, row);
Expand Down

0 comments on commit cd53c18

Please sign in to comment.