Commit 7d969c07fc67086f7c53efb1409ccba637da05c4
1 parent
9b4e49f98a
Exists in
master
and in
1 other branch
add statistics(map) common index
Showing 1 changed file with 16 additions and 8 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/StatisticsController.java
View file @
7d969c0
... | ... | @@ -59,6 +59,12 @@ |
59 | 59 | colormap.put("橙色", "#FFD6BD"); |
60 | 60 | colormap.put("黄色", "#FFFEBD"); |
61 | 61 | colormap.put("其他", "#DEDCE0"); |
62 | + | |
63 | + Normal normal = new Normal(true, null); | |
64 | + Label label = new Label(); | |
65 | + label.setNormal(normal); | |
66 | + label.setEmphasis(normal); | |
67 | + | |
62 | 68 | if (type == 1) { |
63 | 69 | // 地图数据 |
64 | 70 | List<AreaData> provinceRiskList = statisticsService.queryProvinceRisks(); |
65 | 71 | |
66 | 72 | |
67 | 73 | |
68 | 74 | |
69 | 75 | |
70 | 76 | |
... | ... | @@ -67,19 +73,26 @@ |
67 | 73 | Map<String, Integer> mapsData = new HashMap<>(); |
68 | 74 | |
69 | 75 | Option areaBarOption = buildBarOption("建档&高危人数", null); |
76 | + areaBarOption.getLegend().getData().add("近30天建档人数"); | |
77 | + areaBarOption.getLegend().getData().add("当前高危总人数"); | |
78 | + areaBarOption.getLegend().setOrient("horizontal"); | |
79 | + areaBarOption.getLegend().setLeft("40px"); | |
80 | + areaBarOption.getTooltip().setShow(true); | |
70 | 81 | List<Object> areaBarSeriesList = new ArrayList<>(); |
71 | 82 | Series patientSeries = new Series(); |
72 | - patientSeries.setName("建档人数"); | |
83 | + patientSeries.setName("近30天建档人数"); | |
73 | 84 | patientSeries.setType("bar"); |
85 | + patientSeries.setLabel(label); | |
74 | 86 | List<Object> patientDataList = new ArrayList<>(); |
75 | 87 | patientSeries.setData(patientDataList); |
76 | 88 | Series riskSeries = new Series(); |
77 | - riskSeries.setName("高危人数"); | |
89 | + riskSeries.setName("当前高危总人数"); | |
78 | 90 | riskSeries.setType("bar"); |
91 | + riskSeries.setLabel(label); | |
79 | 92 | List<Object> riskDataList = new ArrayList<>(); |
80 | 93 | riskSeries.setData(riskDataList); |
81 | - areaBarSeriesList.add(patientSeries); | |
82 | 94 | areaBarSeriesList.add(riskSeries); |
95 | + areaBarSeriesList.add(patientSeries); | |
83 | 96 | areaBarOption.setSeries(areaBarSeriesList); |
84 | 97 | |
85 | 98 | for (AreaData areaData:provinceRiskList) { |
... | ... | @@ -114,10 +127,6 @@ |
114 | 127 | dataList.add(data); |
115 | 128 | } |
116 | 129 | |
117 | - Normal normal = new Normal(true, null); | |
118 | - Label label = new Label(); | |
119 | - label.setNormal(normal); | |
120 | - label.setEmphasis(normal); | |
121 | 130 | Option option = buildMapOption("孕妇建档数", null); |
122 | 131 | List<Object> seriesList = new ArrayList<>(); |
123 | 132 | Series series = new Series(); |
... | ... | @@ -219,7 +228,6 @@ |
219 | 228 | option.setTooltip(tooltip); |
220 | 229 | Legend legend = new Legend(); |
221 | 230 | List<Object> tempList = new ArrayList<Object>(); |
222 | - tempList.add("高危数"); | |
223 | 231 | legend.setData(tempList); |
224 | 232 | option.setLegend(legend); |
225 | 233 | Grid grid = new Grid(); |