From 752e2454ec58b6c105cdcaed1c03775af00bb017 Mon Sep 17 00:00:00 2001 From: zhoule Date: Mon, 19 Feb 2024 10:49:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9NaN?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../eventDetection/components/dailyDisposal/assets/charts.js | 1 + 1 file changed, 1 insertion(+) diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dailyDisposal/assets/charts.js b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dailyDisposal/assets/charts.js index 2fd64d5b..0e26ca6a 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dailyDisposal/assets/charts.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dailyDisposal/assets/charts.js @@ -48,6 +48,7 @@ var options = { echartsData.forEach((it) => { count += it.value; }) + if (count == 0) count = 1; let obj = echartsData.filter(it => { return it.name == params }) return `{ast|${obj[0].name}} {bst|${Math.round(obj[0].value / count * 100)}%}` },