diff --git a/extensions/dataease-extensions-view/view-racebar/view-racebar-backend/src/main/java/io/dataease/plugins/view/official/impl/RaceBarService.java b/extensions/dataease-extensions-view/view-racebar/view-racebar-backend/src/main/java/io/dataease/plugins/view/official/impl/RaceBarService.java index a70b680992..82800c721c 100644 --- a/extensions/dataease-extensions-view/view-racebar/view-racebar-backend/src/main/java/io/dataease/plugins/view/official/impl/RaceBarService.java +++ b/extensions/dataease-extensions-view/view-racebar/view-racebar-backend/src/main/java/io/dataease/plugins/view/official/impl/RaceBarService.java @@ -150,7 +150,7 @@ public class RaceBarService extends ViewPluginService { data.forEach(ss -> { xs.add(ss[encode.get("y")]); - String key = ss[(Integer) map.get("extIndex")]; + String key = StringUtils.defaultString(ss[(Integer) map.get("extIndex")], StringUtils.EMPTY); if (!keySet.contains(key)) { keySet.add(key); keyList.add(key); @@ -160,7 +160,7 @@ public class RaceBarService extends ViewPluginService { Map> groupData = data.stream().collect(Collectors.toMap( - k -> k[(Integer) map.get("extIndex")], + k -> StringUtils.defaultString(k[(Integer) map.get("extIndex")], StringUtils.EMPTY), v -> { List list = new ArrayList<>(); list.add(v); @@ -179,6 +179,7 @@ public class RaceBarService extends ViewPluginService { map.put("xs", xs); + return map; }