From 676ad16461cd9cc9cff975f227ed407a2e474720 Mon Sep 17 00:00:00 2001 From: ulleo Date: Fri, 8 Sep 2023 11:07:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20[Echarts=E5=8A=A8=E6=80=81=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=E5=9B=BE]=20=E7=A9=BA=E5=AD=97=E6=AE=B5=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E5=9B=BE=E8=A1=A8=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataease/plugins/view/official/impl/RaceBarService.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; }