From 11793fd3120a3cf44ffcf67c761bb4fd463eaf4b Mon Sep 17 00:00:00 2001 From: jianneng-fit2cloud Date: Wed, 3 Jul 2024 08:29:55 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF-=E8=B1=A1?= =?UTF-8?q?=E9=99=90=E5=9B=BE):=20=E4=BF=AE=E5=A4=8D=E8=B1=A1=E9=99=90?= =?UTF-8?q?=E5=9B=BE=E6=97=A0=E6=B3=95=E8=A7=A6=E5=8F=91=E8=81=94=E5=8A=A8?= =?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 --- .../components/js/panel/charts/others/quadrant.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/others/quadrant.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/others/quadrant.ts index d6303d6f87..06e76652ce 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/others/quadrant.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/others/quadrant.ts @@ -164,13 +164,19 @@ export class Quadrant extends G2PlotChartView { defaultBaselineQuadrant.xBaseline = xBaseline defaultBaselineQuadrant.yBaseline = yBaseline } + const getQuotaList = d => { + const eQuotaList = eData.find(item => item.field === d.field)?.quotaList + const yQuotaList = yData.find(item => item.field === d.field)?.quotaList + if (JSON.stringify(eQuotaList) === JSON.stringify(yQuotaList)) { + return yQuotaList + } + return [...(eQuotaList || []), ...(yQuotaList || [])] + } const data = map(defaultTo(xData, []), d => { return { ...d, yAxis: d.value, - quotaList: d.quotaList - .concat(yData.find(item => item.field === d.field)?.quotaList) - .concat(eData.find(item => item.field === d.field)?.quotaList), + quotaList: getQuotaList(d), yAxisExt: yData.find(item => item.field === d.field)?.value, extBubble: eData.find(item => item.field === d.field)?.value }