From 5cf8b85cf30a196fdea74635f550a34da65515ae Mon Sep 17 00:00:00 2001 From: wisonic Date: Tue, 4 Mar 2025 17:52:20 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E6=8C=87=E6=A0=87=E4=B8=BA=200=20=E6=97=B6?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E4=B8=8D=E6=98=BE=E7=A4=BA=E6=8C=87=E6=A0=87?= =?UTF-8?q?=E5=80=BC=20#14918?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/chart/components/js/panel/charts/map/bubble-map.ts | 3 ++- .../src/views/chart/components/js/panel/charts/map/map.ts | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/map/bubble-map.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/map/bubble-map.ts index 41223ca4d4..6a7e0e67de 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/map/bubble-map.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/map/bubble-map.ts @@ -402,7 +402,8 @@ export class BubbleMap extends L7PlotChartView { content.push(name) } if (label.showQuota) { - areaMap[name] && content.push(valueFormatter(areaMap[name], label.quotaLabelFormatter)) + ;(areaMap[name] || areaMap[name] === 0) && + content.push(valueFormatter(areaMap[name], label.quotaLabelFormatter)) } item.properties['_DE_LABEL_'] = content.join('\n\n') } diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/map/map.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/map/map.ts index 418c82a41a..a2b5a0a462 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/map/map.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/map/map.ts @@ -301,7 +301,8 @@ export class Map extends L7PlotChartView { content.push(name) } if (label.showQuota) { - areaMap[name] && content.push(valueFormatter(areaMap[name], label.quotaLabelFormatter)) + ;(areaMap[name] || areaMap[name] === 0) && + content.push(valueFormatter(areaMap[name], label.quotaLabelFormatter)) } item.properties['_DE_LABEL_'] = content.join('\n\n') } @@ -508,7 +509,7 @@ export class Map extends L7PlotChartView { content.push(area.name) } if (label.showQuota) { - areaMap[area.name] && + ;(areaMap[area.name] || areaMap[area.name] === 0) && content.push(valueFormatter(areaMap[area.name].value, label.quotaLabelFormatter)) } labelLocation.push({