From 6cc6f9bbb8db65df119a97e3f489d32b47969613 Mon Sep 17 00:00:00 2001 From: jianneng-fit2cloud Date: Wed, 24 Jul 2024 10:21:43 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=9B=BE=E8=A1=A8=E7=B1=BB=E5=9E=8B=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E6=9C=80=E5=80=BC=E6=B2=A1=E6=9C=89=E9=9A=90=E8=97=8F?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/chart/components/editor/index.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/core-frontend/src/views/chart/components/editor/index.vue b/core/core-frontend/src/views/chart/components/editor/index.vue index 2b38f116ce..23767632d0 100644 --- a/core/core-frontend/src/views/chart/components/editor/index.vue +++ b/core/core-frontend/src/views/chart/components/editor/index.vue @@ -888,6 +888,14 @@ const onTypeChange = (render, type) => { ) { removeItems('drillFields') } + if (!['line', 'area', 'bar', 'bar-group'].includes(view.value.type)) { + // 清除图表标注 + const pointElement = document.getElementById('point_' + view.value.id) + if (pointElement) { + pointElement.remove() + pointElement.parentNode?.removeChild(pointElement) + } + } } curComponent.value.innerType = type calcData(view.value, true)