Explorar o código

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

wangzhe %!s(int64=2) %!d(string=hai) anos
pai
achega
a21b7cf0cc
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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: {