Commit 4725345de47af24fad73d648d4066e22f306ddf9
1 parent
6947be20d5
Exists in
master
and in
1 other branch
add statistics(map) common index
Showing 1 changed file with 7 additions and 3 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/StatisticsController.java
View file @
4725345
... | ... | @@ -426,14 +426,18 @@ |
426 | 426 | title.setSubtext(subTitle); |
427 | 427 | option.setTitle(title); |
428 | 428 | Tooltip tooltip = new Tooltip(); |
429 | + tooltip.setShow(true); | |
429 | 430 | tooltip.setTrigger("axis"); |
430 | 431 | AxisPointer axisPointer = new AxisPointer(); |
431 | 432 | axisPointer.setType("shadow"); |
432 | 433 | tooltip.setAxisPointer(axisPointer); |
433 | 434 | option.setTooltip(tooltip); |
435 | + List<Object> legendData = new ArrayList<Object>(); | |
434 | 436 | Legend legend = new Legend(); |
435 | - List<Object> tempList = new ArrayList<Object>(); | |
436 | - legend.setData(tempList); | |
437 | + legend.setTop("50px"); | |
438 | + legend.setLeft("center"); | |
439 | + legend.setData(legendData); | |
440 | + legend.setOrient("horizontal"); | |
437 | 441 | option.setLegend(legend); |
438 | 442 | Grid grid = new Grid(); |
439 | 443 | grid.setContainLabel(true); |
... | ... | @@ -452,7 +456,7 @@ |
452 | 456 | List<Object> seriesList = new ArrayList<>(); |
453 | 457 | option.setSeries(seriesList); |
454 | 458 | for (String groupName:map.keySet()) { |
455 | - tempList.add(groupName); | |
459 | + legendData.add(groupName); | |
456 | 460 | Map<String, Integer> sub = map.get(groupName); |
457 | 461 | Series series = new Series(); |
458 | 462 | series.setName(groupName); |