From c5ba01079d61231f1e91736a5e009908905b5174 Mon Sep 17 00:00:00 2001 From: lzl0304 Date: Tue, 15 Jul 2025 20:14:37 +0800 Subject: [PATCH] fix(visualMap): fix range comparison --- src/component/visualMap/ContinuousModel.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/component/visualMap/ContinuousModel.ts b/src/component/visualMap/ContinuousModel.ts index 29c3e617e8..569842667d 100644 --- a/src/component/visualMap/ContinuousModel.ts +++ b/src/component/visualMap/ContinuousModel.ts @@ -183,14 +183,8 @@ class ContinuousModel extends VisualMapModel { */ getValueState(value: number): VisualState { const range = this.option.range; - const dataExtent = this.getExtent(); - // When range[0] === dataExtent[0], any value larger than dataExtent[0] maps to 'inRange'. - // range[1] is processed likewise. - return ( - (range[0] <= dataExtent[0] || range[0] <= value) - && (range[1] >= dataExtent[1] || value <= range[1]) - ) ? 'inRange' : 'outOfRange'; + return range[0] <= value && value <= range[1] ? 'inRange' : 'outOfRange'; } findTargetDataIndices(range: number[]) {