From c8055d327a022ba8d4ce150dd29c5022629fb15c Mon Sep 17 00:00:00 2001 From: jianneng-fit2cloud Date: Tue, 30 Jul 2024 11:28:35 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8-=E6=B0=94=E6=B3=A1?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE):=20=E4=BF=AE=E5=A4=8D=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E5=AD=97=E6=AE=B5=E5=B9=B6=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E7=A9=BA=E5=80=BC=E5=A4=84=E7=90=86=E7=BD=AE=E4=B8=BA0?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/chart/components/js/panel/types/impl/l7plot.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/core-frontend/src/views/chart/components/js/panel/types/impl/l7plot.ts b/core/core-frontend/src/views/chart/components/js/panel/types/impl/l7plot.ts index 6e65dea0b7..aeef5f90e9 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/types/impl/l7plot.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/types/impl/l7plot.ts @@ -61,6 +61,10 @@ export abstract class L7PlotChartView< if (emptyDataStrategy === 'setZero') { data.forEach(item => { item.value === null && (item.value = 0) + item.dynamicTooltipValue?.length > 0 && + item.dynamicTooltipValue.forEach(ele => { + ele.value === null && (ele.value = 0) + }) }) } if (emptyDataStrategy === 'ignoreData') { @@ -68,6 +72,11 @@ export abstract class L7PlotChartView< if (data[i].value === null) { data.splice(i, 1) } + for (let j = data[i].dynamicTooltipValue?.length - 1; j >= 0; j--) { + if (data[i].dynamicTooltipValue[j].value === null) { + data[i].dynamicTooltipValue.splice(j, 1) + } + } } } options.source.data = data