forked from github/dataease
fix: [Echarts动态排序图] 空字段导致图表报错
This commit is contained in:
parent
fc7e8fcdb9
commit
676ad16461
@ -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<String, List<String[]>> groupData = data.stream().collect(Collectors.toMap(
|
||||
k -> k[(Integer) map.get("extIndex")],
|
||||
k -> StringUtils.defaultString(k[(Integer) map.get("extIndex")], StringUtils.EMPTY),
|
||||
v -> {
|
||||
List<String[]> list = new ArrayList<>();
|
||||
list.add(v);
|
||||
@ -179,6 +179,7 @@ public class RaceBarService extends ViewPluginService {
|
||||
|
||||
map.put("xs", xs);
|
||||
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user