diff --git a/common/changes/@visactor/vchart/fix-funnel-seriesField_2024-08-12-10-52.json b/common/changes/@visactor/vchart/fix-funnel-seriesField_2024-08-12-10-52.json new file mode 100644 index 0000000000..8dc09ca3b7 --- /dev/null +++ b/common/changes/@visactor/vchart/fix-funnel-seriesField_2024-08-12-10-52.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@visactor/vchart", + "comment": "fix: fix funnel chart color bug with different category and series fields", + "type": "none" + } + ], + "packageName": "@visactor/vchart" +} \ No newline at end of file diff --git a/packages/vchart/src/series/funnel/funnel.ts b/packages/vchart/src/series/funnel/funnel.ts index c88de2ed4d..74863e67fe 100644 --- a/packages/vchart/src/series/funnel/funnel.ts +++ b/packages/vchart/src/series/funnel/funnel.ts @@ -112,7 +112,7 @@ export class FunnelSeries this._funnelAlign = ['left', 'right'].includes(this._spec.funnelAlign) ? this._spec.funnelAlign : 'center'; } - if (this._spec.categoryField) { + if (!this._seriesField && this._spec.categoryField) { this.setSeriesField(this._spec.categoryField); } }