From 2dd8fdf9d15752703f23e6552927468f09a33d6f Mon Sep 17 00:00:00 2001 From: xile611 Date: Thu, 11 Dec 2025 16:37:02 +0800 Subject: [PATCH 1/2] fix: update outlier data handling in BoxPlotSeries, fix #4317 --- .../vchart/src/series/box-plot/box-plot.ts | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/packages/vchart/src/series/box-plot/box-plot.ts b/packages/vchart/src/series/box-plot/box-plot.ts index 310581ea52..a5c6167060 100644 --- a/packages/vchart/src/series/box-plot/box-plot.ts +++ b/packages/vchart/src/series/box-plot/box-plot.ts @@ -100,7 +100,7 @@ export class BoxPlotSeries ex getOutliersStyle() { return this._outliersStyle; } - protected _outlierDataView: ICompilableData; + protected _outlierData: ICompilableData; private _autoBoxWidth: number; @@ -140,10 +140,10 @@ export class BoxPlotSeries ex if (this._outliersField) { this._outlierMark = this._createMark(BoxPlotSeries.mark.outlier, { key: DEFAULT_DATA_INDEX, - groupKey: this._seriesField, - dataView: this._outlierDataView.getDataView(), - dataProductId: this._outlierDataView.getProductId() + groupKey: this._seriesField }) as ISymbolMark; + + this._outlierMark.setData(this._outlierData); } } @@ -324,12 +324,17 @@ export class BoxPlotSeries ex false ); - this._outlierDataView = new CompilableData(this._option, outlierDataView); + this._outlierData = new CompilableData(this._option, outlierDataView); } compileData() { super.compileData(); - this._outlierDataView?.compile(); + this._outlierData?.compile(); + } + + viewDataUpdate(d: DataView): void { + super.viewDataUpdate(d); + this._outlierData?.updateData(); } init(option: IModelInitOption): void { @@ -476,12 +481,6 @@ export class BoxPlotSeries ex return fields; } - onEvaluateEnd(ctx: IModelEvaluateOption): void { - //初次编译时,会传入空数据;待所有计算完成后,需要重新执行updateData更新数据 - super.onEvaluateEnd(ctx); - this._outlierDataView.updateData(); - } - getDefaultShapeType(): string { return 'square'; } From 9306cdc742f294e75fc50e830ab26842dd721a35 Mon Sep 17 00:00:00 2001 From: xile611 Date: Thu, 11 Dec 2025 16:41:09 +0800 Subject: [PATCH 2/2] docs: update changlog of rush --- .../fix-boxPlot-outlier-style_2025-12-11-08-41.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 common/changes/@visactor/vchart/fix-boxPlot-outlier-style_2025-12-11-08-41.json diff --git a/common/changes/@visactor/vchart/fix-boxPlot-outlier-style_2025-12-11-08-41.json b/common/changes/@visactor/vchart/fix-boxPlot-outlier-style_2025-12-11-08-41.json new file mode 100644 index 0000000000..43b969ec2a --- /dev/null +++ b/common/changes/@visactor/vchart/fix-boxPlot-outlier-style_2025-12-11-08-41.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "fix: update outlier data handling in BoxPlotSeries, fix #4317\n\n", + "type": "none", + "packageName": "@visactor/vchart" + } + ], + "packageName": "@visactor/vchart", + "email": "dingling112@gmail.com" +} \ No newline at end of file