forked from github/dataease
parent
7de473d53a
commit
cd8272b065
@ -172,6 +172,19 @@ public class RaceBarService extends ViewPluginService {
|
||||
})
|
||||
);
|
||||
|
||||
Map<String, List<String>> groupXs = data.stream().collect(Collectors.toMap(
|
||||
k -> StringUtils.defaultString(k[(Integer) map.get("extIndex")], StringUtils.EMPTY),
|
||||
v -> {
|
||||
List<String> list = new ArrayList<>();
|
||||
list.add(v[encode.get("y")]);
|
||||
return list;
|
||||
},
|
||||
(oldList, newList) -> {
|
||||
oldList.addAll(newList);
|
||||
return oldList;
|
||||
})
|
||||
);
|
||||
|
||||
|
||||
map.put("groupData", groupData);
|
||||
|
||||
@ -179,6 +192,7 @@ public class RaceBarService extends ViewPluginService {
|
||||
|
||||
map.put("xs", xs);
|
||||
|
||||
map.put("groupXs", groupXs);
|
||||
|
||||
return map;
|
||||
}
|
||||
|
@ -480,6 +480,8 @@ export default {
|
||||
chart_option.graphic.elements[0].style.text = "";
|
||||
}
|
||||
|
||||
chart_option.yAxis.data = chart.data.groupXs[_currentIndex];
|
||||
|
||||
this.currentIndex = _currentIndex;
|
||||
|
||||
_chart.setOption(chart_option);
|
||||
@ -583,7 +585,7 @@ export default {
|
||||
}
|
||||
|
||||
chart_option.yAxis.max = this.sliderMax;
|
||||
chart_option.yAxis.data = chart.data.xs;
|
||||
//chart_option.yAxis.data = chart.data.xs;
|
||||
|
||||
chart_option.animationDurationUpdate = this.sliderTimeout;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user