From 02a7fcd8d1cdefdd1d4816ae46fd0046f99d7bab Mon Sep 17 00:00:00 2001 From: "lixuefei.1313" Date: Tue, 21 Oct 2025 16:38:51 +0800 Subject: [PATCH] fix: fix issue of waterfall stack total --- packages/vchart/src/series/waterfall/waterfall.ts | 9 +++++++++ 1 file changed, 9 insertions(+) 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();