Skip to content

Commit

Permalink
fix: charts should not stack toggle when series has same type but dif…
Browse files Browse the repository at this point in the history
…ferernt axes, fix 2210
  • Loading branch information
xile611 committed Feb 4, 2024
1 parent 20e32e4 commit d2f8861
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/vchart/src/series/cartesian/cartesian.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import {
STACK_FIELD_END_OffsetSilhouette,
STACK_FIELD_START,
STACK_FIELD_START_PERCENT,
STACK_FIELD_START_OffsetSilhouette
STACK_FIELD_START_OffsetSilhouette,
PREFIX
} from '../../constant';
import type { IAxisHelper } from '../../component/axis/cartesian/interface';
import type { DirectionType } from '../../typings/space';
Expand Down Expand Up @@ -196,6 +197,16 @@ export abstract class CartesianSeries<T extends ICartesianSeriesSpec = ICartesia
return this.getGroupFields();
}

getStackValue() {
return (
this._spec.stackValue ??
`${PREFIX}_series_${this.type}_${(this.direction === Direction.horizontal
? this.getXAxisHelper()
: this.getYAxisHelper()
).getAxisId()}`
);
}

getStackValueField() {
// TODO: hack
if (this.direction === Direction.vertical) {
Expand Down

0 comments on commit d2f8861

Please sign in to comment.