fix(图表): 修复双轴图右轴钻取项若与右子类别相同时,导致钻取错误的问题

This commit is contained in:
ulleo 2024-09-20 18:37:58 +08:00
parent 7a0132df6b
commit b02af31ce6

View File

@ -116,7 +116,12 @@ public class MixHandler extends YoyChartHandler {
var extBubble = new ArrayList<>(formatResult.getAxisMap().get(ChartAxis.extBubble));
xAxis.addAll(extBubble);
var dillAxis = (ArrayList<ChartViewFieldDTO>) 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));