From 510a5b324240032faa56c21af9b2d82375b83199 Mon Sep 17 00:00:00 2001 From: tiwarir Date: Mon, 29 Jun 2026 14:15:35 -0400 Subject: [PATCH] fix(line): respect disabled emphasis in hover. close #21634 --- src/chart/line/LineView.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/chart/line/LineView.ts b/src/chart/line/LineView.ts index 847a876495..f7f2281f99 100644 --- a/src/chart/line/LineView.ts +++ b/src/chart/line/LineView.ts @@ -942,9 +942,14 @@ class LineView extends ChartView { ) { const data = seriesModel.getData(); const dataIndex = modelUtil.queryDataIndex(data, payload); + const emphasisDisabled = seriesModel.getModel('emphasis').get('disabled'); this._changePolyState('emphasis'); + if (emphasisDisabled) { + return; + } + if (!(dataIndex instanceof Array) && dataIndex != null && dataIndex >= 0) { const points = data.getLayout('points'); let symbol = data.getItemGraphicEl(dataIndex) as SymbolClz; @@ -1001,6 +1006,7 @@ class LineView extends ChartView { ) { const data = seriesModel.getData(); const dataIndex = modelUtil.queryDataIndex(data, payload) as number; + const emphasisDisabled = seriesModel.getModel('emphasis').get('disabled'); this._changePolyState('normal'); @@ -1011,12 +1017,12 @@ class LineView extends ChartView { data.setItemGraphicEl(dataIndex, null); this.group.remove(symbol); } - else { + else if (!emphasisDisabled) { symbol.downplay(); } } } - else { + else if (!emphasisDisabled) { // FIXME // can not downplay completely. // Downplay whole series