Bläddra i källkod

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

wangzhe 2 år sedan
förälder
incheckning
a21b7cf0cc
1 ändrade filer med 1 tillägg och 1 borttagningar
  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: {