diff --git a/packages/vchart/src/series/waterfall/waterfall.ts b/packages/vchart/src/series/waterfall/waterfall.ts index cd17cc5a9d..7e94f1f9df 100644 --- a/packages/vchart/src/series/waterfall/waterfall.ts +++ b/packages/vchart/src/series/waterfall/waterfall.ts @@ -34,6 +34,8 @@ import type { IBarAnimationParams } from '../bar/interface'; import type { ILabelInfo } from '../../component/label/interface'; import { CompilableData, type ICompilableData } from '../../compile/data'; import { waterfall as waterfallTheme } from '../../theme/builtin/common/series/waterfall'; +import type { IStackCacheNode } from '../../util'; +import { getRegionStackGroup, stackTotal } from '../../util'; export const DefaultBandWidth = 6; // 默认的bandWidth,避免连续轴没有bandWidth @@ -134,8 +136,15 @@ export class WaterfallSeries { + const stackData = this.getStackData(); + const stackValueField = this.getStackValueField(); + stackTotal(stackData as IStackCacheNode, stackValueField); + }; + compileData() { super.compileData(); this._totalData?.compile();