From 096e52bb0c8ef0a834206edc9b489c477d88fa22 Mon Sep 17 00:00:00 2001 From: ulleo Date: Thu, 13 Jun 2024 15:15:31 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=9F=B1=E7=BA=BF=E7=BB=84=E5=90=88=E5=9B=BE=E9=92=BB=E5=8F=96?= =?UTF-8?q?=E5=A4=B1=E6=95=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/components/ChartComponentG2Plot.vue | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/core/core-frontend/src/views/chart/components/views/components/ChartComponentG2Plot.vue b/core/core-frontend/src/views/chart/components/views/components/ChartComponentG2Plot.vue index 2509788371..e9539bd74d 100644 --- a/core/core-frontend/src/views/chart/components/views/components/ChartComponentG2Plot.vue +++ b/core/core-frontend/src/views/chart/components/views/components/ChartComponentG2Plot.vue @@ -330,11 +330,24 @@ const trackClick = trackAction => { const curFiled = curView.drillFields[curView.drillFilters.length] fieldIds.push(curFiled.id) } - chartData.value?.fields.forEach(field => { - if (!fieldIds.includes(field.id)) { - fieldIds.push(field.id) - } - }) + if (curView.type.includes('chart-mix')) { + chartData.value?.left?.fields?.forEach(field => { + if (!fieldIds.includes(field.id)) { + fieldIds.push(field.id) + } + }) + chartData.value?.right?.fields?.forEach(field => { + if (!fieldIds.includes(field.id)) { + fieldIds.push(field.id) + } + }) + } else { + chartData.value?.fields?.forEach(field => { + if (!fieldIds.includes(field.id)) { + fieldIds.push(field.id) + } + }) + } for (let i = 0; i < fieldIds.length; i++) { const id = fieldIds[i] const sourceInfo = view.value.id + '#' + id