Skip to content

Commit d2f8861

Browse files
committed
fix: charts should not stack toggle when series has same type but differernt axes, fix 2210
1 parent 20e32e4 commit d2f8861

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

packages/vchart/src/series/cartesian/cartesian.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import {
99
STACK_FIELD_END_OffsetSilhouette,
1010
STACK_FIELD_START,
1111
STACK_FIELD_START_PERCENT,
12-
STACK_FIELD_START_OffsetSilhouette
12+
STACK_FIELD_START_OffsetSilhouette,
13+
PREFIX
1314
} from '../../constant';
1415
import type { IAxisHelper } from '../../component/axis/cartesian/interface';
1516
import type { DirectionType } from '../../typings/space';
@@ -196,6 +197,16 @@ export abstract class CartesianSeries<T extends ICartesianSeriesSpec = ICartesia
196197
return this.getGroupFields();
197198
}
198199

200+
getStackValue() {
201+
return (
202+
this._spec.stackValue ??
203+
`${PREFIX}_series_${this.type}_${(this.direction === Direction.horizontal
204+
? this.getXAxisHelper()
205+
: this.getYAxisHelper()
206+
).getAxisId()}`
207+
);
208+
}
209+
199210
getStackValueField() {
200211
// TODO: hack
201212
if (this.direction === Direction.vertical) {

0 commit comments

Comments
 (0)