소스 검색

数字资源 事件来源,类型统计

wangzhe 2 년 전
부모
커밋
a21b7cf0cc
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/views/bigdata/chart-event.vue

+ 1 - 1
src/views/bigdata/chart-event.vue

@@ -169,7 +169,7 @@ export default {
             }
           ]
         })
-        v.percent = ((v.value / sum) * 100).toFixed(1) + '%'
+        v.percent = sum == 0 ? '0%' : ((v.value / sum) * 100).toFixed(1) + '%'
         lineYAxis.push({
           value: i,
           textStyle: {