Skip to content

Commit

Permalink
fix: fix axis column/row visible in pivotchart #1309
Browse files Browse the repository at this point in the history
  • Loading branch information
Rui-Sun committed Mar 25, 2024
1 parent 82c935c commit d0be90d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vtable",
"comment": "fix: fix axis column/row visible in pivotchart #1309",
"type": "none"
}
],
"packageName": "@visactor/vtable"
}
8 changes: 7 additions & 1 deletion packages/vtable/src/layout/pivot-header-layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,13 @@ export class PivotHeaderLayoutMap implements LayoutMapAPI {
if (
indicatorObject.chartSpec &&
indicatorObject.chartSpec.series &&
indicatorObject.chartSpec.series.length > 1
indicatorObject.chartSpec.series.length > 1 &&
indicatorObject.chartSpec.axes?.every((axis: any) => {
if (axis.orient === (this.indicatorsAsCol ? 'top' : 'right') && axis.visible === false) {
return false;
}
return true;
})
) {
return true;
}
Expand Down

0 comments on commit d0be90d

Please sign in to comment.