Merge pull request #6814 from ulleo/dev

fix: AntV散点图指标维度计算占比提示异常
This commit is contained in:
ulleo 2023-11-23 14:43:13 +08:00 committed by GitHub
commit 90775b7197
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1294,7 +1294,9 @@ public class ChartViewService {
String compareFieldId = compareCalc.getField();// 选中字段
// 计算指标对应的下标
int dataIndex = 0;// 数据字段下标
if (StringUtils.containsIgnoreCase(view.getType(), "stack")) {
if (CollectionUtils.isNotEmpty(xAxis) && StringUtils.equals(xAxis.get(0).getGroupType(), "q") && StringUtils.equalsIgnoreCase(view.getRender(), "antv")) {
dataIndex = extStack.size() + i;
} else if (StringUtils.containsIgnoreCase(view.getType(), "stack")) {
dataIndex = xAxis.size() + extStack.size() + i;
} else {
dataIndex = xAxis.size() + i;