From bb3199c71ddc0d8fab25a1657650f03c651825d1 Mon Sep 17 00:00:00 2001 From: wisonic Date: Wed, 6 Nov 2024 18:40:20 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=A0=86=E5=8F=A0=E6=9F=B1=E7=8A=B6=E5=9B=BE=E4=B8=8B=E9=92=BB?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E6=8E=92=E5=BA=8F=E4=B8=8D=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/dataease/chart/charts/impl/bar/StackBarHandler.java | 6 +++--- .../main/java/io/dataease/chart/manage/ChartDataManage.java | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/core/core-backend/src/main/java/io/dataease/chart/charts/impl/bar/StackBarHandler.java b/core/core-backend/src/main/java/io/dataease/chart/charts/impl/bar/StackBarHandler.java index fb8b8cb805..82f0827134 100644 --- a/core/core-backend/src/main/java/io/dataease/chart/charts/impl/bar/StackBarHandler.java +++ b/core/core-backend/src/main/java/io/dataease/chart/charts/impl/bar/StackBarHandler.java @@ -52,10 +52,10 @@ public class StackBarHandler extends BarHandler { if (ObjectUtils.isNotEmpty(extStack) && Objects.equals(drillFields.get(0).getId(), extStack.get(0).getId())) { fieldsToFilter.addAll(view.getXAxis()); + groupStackDrill(noDrillFieldAxis, noDrillFilterList, fieldsToFilter, drillFields, drillRequestList); + formatResult.getAxisMap().put(ChartAxis.xAxis, noDrillFieldAxis); + result.setFilterList(noDrillFilterList); } - groupStackDrill(noDrillFieldAxis, noDrillFilterList, fieldsToFilter, drillFields, drillRequestList); - formatResult.getAxisMap().put(ChartAxis.xAxis, noDrillFieldAxis); - result.setFilterList(noDrillFilterList); } return (T) result; } diff --git a/core/core-backend/src/main/java/io/dataease/chart/manage/ChartDataManage.java b/core/core-backend/src/main/java/io/dataease/chart/manage/ChartDataManage.java index 3707da539a..8ce8bc3aa1 100644 --- a/core/core-backend/src/main/java/io/dataease/chart/manage/ChartDataManage.java +++ b/core/core-backend/src/main/java/io/dataease/chart/manage/ChartDataManage.java @@ -316,6 +316,11 @@ public class ChartDataManage { dillAxis.add(nextDrillField); fields.add(nextDrillField.getId()); } else { + Optional axis = xAxis.stream().filter(x -> Objects.equals(x.getId(), nextDrillField.getId())).findFirst(); + axis.ifPresent(field -> { + field.setSort(nextDrillField.getSort()); + field.setCustomSort(nextDrillField.getCustomSort()); + }); dillAxis.add(nextDrillField); } }