From 4f70d910cbba8b96f9ab0922899df198dda15a7a Mon Sep 17 00:00:00 2001 From: LokerL Date: Fri, 13 Dec 2024 19:31:11 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20=E5=B7=A6=E4=B8=8A=E6=8A=98?= =?UTF-8?q?=E7=BA=BF=E5=9B=BEtooltip=E5=8A=A0=E5=8D=95=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataStatistics/realtime/left-top.vue | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/ruoyi-ui/src/views/dataStatistics/realtime/left-top.vue b/ruoyi-ui/src/views/dataStatistics/realtime/left-top.vue index 738c850..2162dca 100644 --- a/ruoyi-ui/src/views/dataStatistics/realtime/left-top.vue +++ b/ruoyi-ui/src/views/dataStatistics/realtime/left-top.vue @@ -41,7 +41,29 @@ export default { id: "main", Xdata: [], Ydata: [], - option: {}, + option: { + tooltip: { + trigger: "axis", + axisPointer: { + type: "cross", + label: { + backgroundColor: "#6a7985", + }, + }, + formatter: function (params) { + return ( + `${params[0].name} +
+ ${params[0].marker} + 读数 + : + ${params[0].value} + mg/m³ + ` + ); + }, + }, + }, }, refreshDebounce: null, };