From 7e9c9ddeef0b13c02f15a2b7167fba12e58a65a0 Mon Sep 17 00:00:00 2001 From: wisonic Date: Tue, 5 Aug 2025 17:44:48 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E4=BB=AA=E8=A1=A8=E7=9B=98=E5=92=8C=E6=B0=B4=E6=B3=A2=E5=9B=BE?= =?UTF-8?q?=E5=80=BC=E4=B8=BA=200=20=E6=97=B6=E6=98=BE=E7=A4=BA=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=20#16419?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../editor/editor-style/components/MiscSelector.vue | 2 +- .../views/chart/components/js/panel/charts/liquid/liquid.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/core-frontend/src/views/chart/components/editor/editor-style/components/MiscSelector.vue b/core/core-frontend/src/views/chart/components/editor/editor-style/components/MiscSelector.vue index 2859ef6ef5..ee6ef95496 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-style/components/MiscSelector.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-style/components/MiscSelector.vue @@ -57,7 +57,7 @@ const gaugeLiquidYaxisValue = args => { const key = type === 'gauge' ? 'gaugeMax' : type === 'liquid' ? 'liquidMax' : null if (key) { gaugeLiquidYaxisDefaultValue[key] = cloneDeep(max) - if (!state.miscForm[key]) { + if (state.miscForm[key] === undefined || state.miscForm[key] === null) { state.miscForm[key] = gaugeLiquidYaxisDefaultValue[key] changeMisc() } diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/liquid/liquid.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/liquid/liquid.ts index 9a22ed318b..35d77f5600 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/liquid/liquid.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/liquid/liquid.ts @@ -73,7 +73,9 @@ export class Liquid extends G2PlotChartView { }) }) // 处理空数据, 只要有一个指标是空数据,就不显示图表 - const hasNoneData = chart.data?.series.some(s => !s.data?.[0]) + const hasNoneData = chart.data?.series.some( + s => s.data?.[0] === undefined || s.data?.[0] === null + ) this.configEmptyDataStyle(hasNoneData ? [] : [1], container, newChart) if (hasNoneData) { return