From b8a72fe64c7dce111517e18f1b9c3b73ab49fb36 Mon Sep 17 00:00:00 2001 From: ZhangXianQiang <1135831638@qq.com> Date: 星期三, 28 二月 2024 18:01:45 +0800 Subject: [PATCH] feat:安全隐患数据统计 --- src/views/daoAnOffice/right/analysis/index.vue | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 53 insertions(+), 7 deletions(-) diff --git a/src/views/daoAnOffice/right/analysis/index.vue b/src/views/daoAnOffice/right/analysis/index.vue index 5b30525..2b282f2 100644 --- a/src/views/daoAnOffice/right/analysis/index.vue +++ b/src/views/daoAnOffice/right/analysis/index.vue @@ -28,14 +28,14 @@ ]); const testData = ref([ - { name: '濂庡厜濉旇閬�', state1: 972, state2: 2124, state3: 1500 }, - { name: '钂查槼琛楅亾', state1: 972, state2: 2124, state3: 1500 }, + { name: '濂庡厜濉旇閬�', state1: 1400, state2: 3533, state3: 2316 }, + { name: '钂查槼琛楅亾', state1: 1820, state2: 4281, state3: 3064 }, { name: '鑱氭簮闀�', state1: 972, state2: 2124, state3: 1500 }, - { name: '閾舵潖琛楅亾', state1: 972, state2: 2124, state3: 1500 }, + { name: '閾舵潖琛楅亾', state1: 1109, state2: 2876, state3: 1500 }, { name: '鐭崇緤闀�', state1: 972, state2: 2124, state3: 1500 }, { name: '榫欐睜闀�', state1: 972, state2: 2124, state3: 1500 }, - { name: '澶╅┈闀�', state1: 972, state2: 2124, state3: 1500 }, - { name: '鐜夊爞琛楅亾', state1: 972, state2: 2124, state3: 1500 }, + { name: '澶╅┈闀�', state1: 972, state2: 4000, state3: 1500 }, + { name: '鐜夊爞琛楅亾', state1: 972, state2: 2878, state3: 1500 }, { name: '鐏屽彛琛楅亾', state1: 972, state2: 2124, state3: 1500 }, ]); @@ -43,9 +43,31 @@ const echartsConfig = { legend: { right: '0', + icon: 'circle', textStyle: { color: 'rgba(77, 118, 176, 1)' }, + data: [ + { + name: '閱夐┚', + itemStyle: { + color: 'rgba(0, 168, 217, 1)' + } + }, + { + name: '閰掗┚', + itemStyle: { + color: 'rgba(207, 178, 73, 1)' + } + }, + { + name: '鍏朵粬', + itemStyle: { + color: 'rgba(43, 176, 109, 1)' + } + }, + ] + }, tooltip: {}, grid: { @@ -59,7 +81,7 @@ dimensions: ['name', 'state1', 'state2', 'state3'], source: testData.value }, - xAxis: { type: 'category' }, + xAxis: { type: 'category', axisTick: false }, yAxis: {}, // Declare several bar series, each will be mapped // to a column of dataset.source by default. @@ -67,6 +89,14 @@ { type: 'bar', name: '閱夐┚', + barWidth: 13, + barGap: '50%', + label: { + show: true, // 鏄剧ず鏍囩 + position: 'top', // 鏍囩浣嶇疆 + color: 'rgba(0, 168, 217, 1)', // 鏍囩棰滆壊 + fontSize: 10, + }, itemStyle: { // 璁剧疆娓愬彉鑹� color: new echarts.graphic.LinearGradient( @@ -81,6 +111,14 @@ { type: 'bar', name: '閰掗┚', + barWidth: 13, + barGap: '50%', + label: { + show: true, // 鏄剧ず鏍囩 + position: 'top', // 鏍囩浣嶇疆 + color: 'rgba(207, 178, 73, 1)', // 鏍囩棰滆壊 + fontSize: 10, + }, itemStyle: { // 璁剧疆娓愬彉鑹� color: new echarts.graphic.LinearGradient( @@ -95,6 +133,14 @@ { type: 'bar', name: '鍏朵粬', + barWidth: 13, + barGap: '50%', + label: { + show: true, // 鏄剧ず鏍囩 + position: 'top', // 鏍囩浣嶇疆 + color: 'rgba(43, 176, 109, 1)', // 鏍囩棰滆壊 + fontSize: 10, + }, itemStyle: { // 璁剧疆娓愬彉鑹� color: new echarts.graphic.LinearGradient( @@ -137,7 +183,7 @@ .charts-container { width: 100%; - height: 306px; + height: 280px; padding: 20px; background-color: rgba(17, 34, 58, 0.6); border: 1px solid rgba(47, 91, 157, 0.8); -- Gitblit v1.8.0