Commit cc6ce903f774483cfc50c8817c1467a2008123b4

Authored by liquanyu

Merge remote-tracking branch 'origin/master'

Showing 1 changed file

platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/StatisticsController.java View file @ cc6ce90
... ... @@ -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,27 @@
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("3%");
  80 + areaBarOption.getLegend().setTop("60px");
  81 + areaBarOption.getTooltip().setShow(true);
70 82 List<Object> areaBarSeriesList = new ArrayList<>();
71 83 Series patientSeries = new Series();
72   - patientSeries.setName("建档人数");
  84 + patientSeries.setName("近30天建档人数");
73 85 patientSeries.setType("bar");
  86 + patientSeries.setLabel(label);
74 87 List<Object> patientDataList = new ArrayList<>();
75 88 patientSeries.setData(patientDataList);
76 89 Series riskSeries = new Series();
77   - riskSeries.setName("高危人数");
  90 + riskSeries.setName("当前高危总人数");
78 91 riskSeries.setType("bar");
  92 + riskSeries.setLabel(label);
79 93 List<Object> riskDataList = new ArrayList<>();
80 94 riskSeries.setData(riskDataList);
81   - areaBarSeriesList.add(patientSeries);
82 95 areaBarSeriesList.add(riskSeries);
  96 + areaBarSeriesList.add(patientSeries);
83 97 areaBarOption.setSeries(areaBarSeriesList);
84 98  
85 99 for (AreaData areaData:provinceRiskList) {
... ... @@ -114,10 +128,6 @@
114 128 dataList.add(data);
115 129 }
116 130  
117   - Normal normal = new Normal(true, null);
118   - Label label = new Label();
119   - label.setNormal(normal);
120   - label.setEmphasis(normal);
121 131 Option option = buildMapOption("孕妇建档数", null);
122 132 List<Object> seriesList = new ArrayList<>();
123 133 Series series = new Series();
... ... @@ -219,7 +229,6 @@
219 229 option.setTooltip(tooltip);
220 230 Legend legend = new Legend();
221 231 List<Object> tempList = new ArrayList<Object>();
222   - tempList.add("高危数");
223 232 legend.setData(tempList);
224 233 option.setLegend(legend);
225 234 Grid grid = new Grid();