From 309849b1b8b9805f86779dc306a73f09966e26e1 Mon Sep 17 00:00:00 2001 From: plainheart Date: Wed, 20 Oct 2021 10:41:28 +0800 Subject: [PATCH] fix(axis): charts render abnormally when `yAxis.max` is set to be a value less than the min value of the series data. --- src/coord/scaleRawExtentInfo.ts | 5 ---- test/axis-filter-extent2.html | 42 ++++++++++++++++++++++++++++++++- 2 files changed, 41 insertions(+), 6 deletions(-) diff --git a/src/coord/scaleRawExtentInfo.ts b/src/coord/scaleRawExtentInfo.ts index 45d2dc7d43..bdc87ea99e 100644 --- a/src/coord/scaleRawExtentInfo.ts +++ b/src/coord/scaleRawExtentInfo.ts @@ -201,11 +201,6 @@ export class ScaleRawExtentInfo { (min == null || !isFinite(min)) && (min = NaN); (max == null || !isFinite(max)) && (max = NaN); - if (min > max) { - min = NaN; - max = NaN; - } - const isBlank = eqNaN(min) || eqNaN(max) || (isOrdinal && !axisDataLen); diff --git a/test/axis-filter-extent2.html b/test/axis-filter-extent2.html index 72bd53341b..c2dbbcd837 100644 --- a/test/axis-filter-extent2.html +++ b/test/axis-filter-extent2.html @@ -37,7 +37,7 @@
- +
+ +