From 133ae08d36641adcf9c31b856b2251bf82691f69 Mon Sep 17 00:00:00 2001 From: chenjinsong <523037378@qq.com> Date: Wed, 14 Aug 2024 15:25:40 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96detection=E9=A1=B6?= =?UTF-8?q?=E9=83=A8=E6=9F=B1=E7=8A=B6=E5=9B=BE=E7=9A=84tooltip=E4=BA=A4?= =?UTF-8?q?=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/detections/Index.vue | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/views/detections/Index.vue b/src/views/detections/Index.vue index 18ff450b..4b2e3786 100644 --- a/src/views/detections/Index.vue +++ b/src/views/detections/Index.vue @@ -292,13 +292,14 @@ export default { // 将100个时间间隔与柱状图数据合并并排序 dataList = dataList.concat(timeList) dataList.sort((a, b) => a[0] - b[0]) - const xData = [] - dataList.forEach(item => { - if (xData.indexOf(item[0]) < 0) { - xData.push(item[0]) + dataList = dataList.filter((d, i) => { + if (i > 0 && i < dataList.length - 1) { + if (d[1] === 0) { + return false + } } + return true }) - eventSeverityTrendOption.series[0].data = dataList let detectionChart = echarts.getInstanceByDom(chartDom)