feat: 左上折线图tooltip加单位

This commit is contained in:
LokerL 2024-12-13 19:31:11 +08:00
parent 7577e6c29c
commit 4f70d910cb
1 changed files with 23 additions and 1 deletions

View File

@ -41,7 +41,29 @@ export default {
id: "main", id: "main",
Xdata: [], Xdata: [],
Ydata: [], Ydata: [],
option: {}, option: {
tooltip: {
trigger: "axis",
axisPointer: {
type: "cross",
label: {
backgroundColor: "#6a7985",
},
},
formatter: function (params) {
return (
`${params[0].name}
<br />
${params[0].marker}
读数
:
<strong>${params[0].value}</strong>
mg/
`
);
},
},
},
}, },
refreshDebounce: null, refreshDebounce: null,
}; };