From dd60436316854369a33b01d6b10f02aaa88de118 Mon Sep 17 00:00:00 2001 From: "lixuefei.1313" Date: Thu, 26 Oct 2023 10:30:10 +0800 Subject: [PATCH] fix: fix the specXField need transform to array --- packages/vchart/src/series/cartesian/cartesian.ts | 12 +++++++++--- packages/vchart/src/series/polar/polar.ts | 3 ++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/vchart/src/series/cartesian/cartesian.ts b/packages/vchart/src/series/cartesian/cartesian.ts index 96f27cb051..7a431f0f85 100644 --- a/packages/vchart/src/series/cartesian/cartesian.ts +++ b/packages/vchart/src/series/cartesian/cartesian.ts @@ -78,6 +78,9 @@ export abstract class CartesianSeries { if (this._xAxisHelper.isContinuous) { - if (!couldBeValidNumber(datum[this._spec.xField[0]])) { + if (!couldBeValidNumber(datum[this._specXField[0]])) { return false; } - } else if (this._yAxisHelper.isContinuous) { - if (!couldBeValidNumber(datum[this._spec.yField[0]])) { + } + if (this._yAxisHelper.isContinuous) { + if (!couldBeValidNumber(datum[this._specYField[0]])) { return false; } } diff --git a/packages/vchart/src/series/polar/polar.ts b/packages/vchart/src/series/polar/polar.ts index 07033d4f13..b5baa2874e 100644 --- a/packages/vchart/src/series/polar/polar.ts +++ b/packages/vchart/src/series/polar/polar.ts @@ -235,7 +235,8 @@ export abstract class PolarSeries if (!couldBeValidNumber(datum[this._angleField[0]])) { return false; } - } else if (this.radiusAxisHelper.isContinuous) { + } + if (this.radiusAxisHelper.isContinuous) { if (!couldBeValidNumber(datum[this._radiusField[0]])) { return false; }