forked from github/dataease
Merge pull request #13183 from dataease/pr@dev-v2@fix_drill_sort
fix(图表): 修复堆叠柱状图下钻字段排序不生效
This commit is contained in:
commit
ef62656bcc
@ -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;
|
||||
}
|
||||
|
@ -316,6 +316,11 @@ public class ChartDataManage {
|
||||
dillAxis.add(nextDrillField);
|
||||
fields.add(nextDrillField.getId());
|
||||
} else {
|
||||
Optional<ChartViewFieldDTO> 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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user