From b02af31ce62c798307d78dd2dbbd523dfe75611d Mon Sep 17 00:00:00 2001 From: ulleo Date: Fri, 20 Sep 2024 18:37:58 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=8F=8C=E8=BD=B4=E5=9B=BE=E5=8F=B3=E8=BD=B4=E9=92=BB=E5=8F=96?= =?UTF-8?q?=E9=A1=B9=E8=8B=A5=E4=B8=8E=E5=8F=B3=E5=AD=90=E7=B1=BB=E5=88=AB?= =?UTF-8?q?=E7=9B=B8=E5=90=8C=E6=97=B6=EF=BC=8C=E5=AF=BC=E8=87=B4=E9=92=BB?= =?UTF-8?q?=E5=8F=96=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/dataease/chart/charts/impl/mix/MixHandler.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/core-backend/src/main/java/io/dataease/chart/charts/impl/mix/MixHandler.java b/core/core-backend/src/main/java/io/dataease/chart/charts/impl/mix/MixHandler.java index 962bd853b7..32dac3a981 100644 --- a/core/core-backend/src/main/java/io/dataease/chart/charts/impl/mix/MixHandler.java +++ b/core/core-backend/src/main/java/io/dataease/chart/charts/impl/mix/MixHandler.java @@ -116,7 +116,12 @@ public class MixHandler extends YoyChartHandler { var extBubble = new ArrayList<>(formatResult.getAxisMap().get(ChartAxis.extBubble)); xAxis.addAll(extBubble); var dillAxis = (ArrayList) formatResult.getContext().get("dillAxis"); - xAxis.addAll(dillAxis); + var fields = xAxis.stream().map(ChartViewFieldDTO::getId).collect(Collectors.toSet()); + for (ChartViewFieldDTO dillAxi : dillAxis) { + if (!fields.contains(dillAxi.getId())) { + xAxis.add(dillAxi); + } + } formatResult2.getAxisMap().put(ChartAxis.xAxis, xAxis); formatResult2.getAxisMap().put(ChartAxis.xAxisExt, extBubble); var yAxisExt = new ArrayList<>(formatResult.getAxisMap().get(ChartAxis.yAxisExt));