浏览代码

优化饼图展示方式

seimin 10 月之前
父节点
当前提交
648cf4f4c0

+ 2 - 1
src/app/views/medical-waste-hospital-statistics/medical-waste-hospital-statistics.component.ts

@@ -223,6 +223,7 @@ export class MedicalWasteHospitalStatisticsComponent implements OnInit {
223
           type: 'pie',
223
           type: 'pie',
224
           radius: '50%',
224
           radius: '50%',
225
           data: nums,
225
           data: nums,
226
+          center: ['40%', '50%'],
226
           emphasis: {
227
           emphasis: {
227
             itemStyle: {
228
             itemStyle: {
228
               shadowBlur: 10,
229
               shadowBlur: 10,
@@ -232,7 +233,7 @@ export class MedicalWasteHospitalStatisticsComponent implements OnInit {
232
           },
233
           },
233
           label: {
234
           label: {
234
             show: true,
235
             show: true,
235
-            formatter: "{b} {d}%"
236
+            formatter: "{b}\n{d}%"
236
           },
237
           },
237
         },
238
         },
238
       ],
239
       ],