From c3090fbfd7b8bb8f0a0ab73cc52dd8d149980d76 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=93=E6=B4=81?= <209192278@qq.com>
Date: Tue, 9 Jan 2024 20:30:24 +0800
Subject: [PATCH] =?UTF-8?q?=E9=82=93=E6=B4=81:=20=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E7=94=B5=E6=B5=81echarts=E6=8F=90=E7=A4=BA=E6=A1=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../content/badGasInfo/BadGasInfo.vue | 2 +-
src/components/content/fanInfo/FanInfo.vue | 38 ++++++++++++-------
2 files changed, 26 insertions(+), 14 deletions(-)
diff --git a/src/components/content/badGasInfo/BadGasInfo.vue b/src/components/content/badGasInfo/BadGasInfo.vue
index 2a18979..5095d26 100644
--- a/src/components/content/badGasInfo/BadGasInfo.vue
+++ b/src/components/content/badGasInfo/BadGasInfo.vue
@@ -197,7 +197,7 @@ const initChart = (type, values) => {
fontSize: 40,
},
formatter: (params) => {
- let res = `
${params[0].name}
` + '
'
+ let res = ` ${params[0].name}
` + '
'
for (let i = 0; i < params.length; i++) {
res += `
${params[i].seriesName}: ${params[i].value}
diff --git a/src/components/content/fanInfo/FanInfo.vue b/src/components/content/fanInfo/FanInfo.vue
index c2c485b..304a382 100644
--- a/src/components/content/fanInfo/FanInfo.vue
+++ b/src/components/content/fanInfo/FanInfo.vue
@@ -392,25 +392,37 @@ const initChart = (type, valueA,valueB,valueC) => {
tooltip: {
show: true,
trigger: 'axis',
- backgroundColor: "transparent", // 设置背景颜色为透明
- borderColor: "transparent", // 设置边框颜色为透明
+ backgroundColor: "rgba(20,36,51,0.7)", // 设置背景颜色为透明
+ borderColor: "#6087BA", // 设置边框颜色为透明
padding: 0, // 设置内边距为0
+ borderWidth: 2,
textStyle: {
fontSize: 40
},
- formatter: function (params) {
- let content = `
-
-
${params[0].name}
-
${params[0].value}
-
${params[1].name}
-
${params[1].value}
-
${params[2].name}
-
${params[2].value}
+ formatter: (params) => {
+ let res = `
${params[0].name}
` + '
'
+ for (let i = 0; i < params.length; i++) {
+ res += `
+
${params[i].seriesName}: ${params[i].value}
+ `;
+ }
+ return res
-
`;
- return content;
+ // return content;
},
+ // formatter: function (params) {
+ // let content = `
+ //
+ //
${params[0].name}
+ //
${params[0].value}
+ //
${params[1].name}
+ //
${params[1].value}
+ //
${params[2].name}
+ //
${params[2].value}
+ //
+ //
`;
+ // return content;
+ // },
},
toolbox: {
show: false,