From 88fc3c8445f38c773493daa7385501f2b9f89d35 Mon Sep 17 00:00:00 2001 From: jianneng-fit2cloud Date: Mon, 12 Aug 2024 18:38:09 +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=E3=80=81=E6=B0=94=E6=B3=A1=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E5=9C=B0=E5=8C=BA=E4=B8=BA=E7=9C=81=E4=BB=BD=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E5=90=AF=E7=94=A8=E6=8F=90=E7=A4=BA=E8=BD=AE?= =?UTF-8?q?=E6=92=AD=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/js/panel/charts/map/tooltip-carousel.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/map/tooltip-carousel.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/map/tooltip-carousel.ts index c70615e297..b13f79824b 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/map/tooltip-carousel.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/map/tooltip-carousel.ts @@ -7,6 +7,16 @@ import { Scene } from '@antv/l7-scene' import { deepCopy } from '@/utils/utils' export const configCarouselTooltip = (chart, view, data, scene) => { + if (['bubble-map', 'map'].includes(chart.type)) { + data = view.source.data.dataArray + ?.filter(i => i.value) + .reduce((acc, current) => { + if (!acc.some(obj => obj.adcode === current.adcode)) { + acc.push(current) + } + return acc + }, []) + } if (carouselManagerInstances[chart.container]) { const instances = carouselManagerInstances[chart.container] instances.update(scene, chart, view, data)