소스 검색

优化饼图展示方式

seimin 10 달 전
부모
커밋
648cf4f4c0
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/app/views/medical-waste-hospital-statistics/medical-waste-hospital-statistics.component.ts

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