调整页面echart

This commit is contained in:
GGJ
2025-05-06 16:38:10 +08:00
parent f8a26b3320
commit 60cdff21b6
9 changed files with 186 additions and 173 deletions

View File

@@ -64,6 +64,18 @@ const initChart = () => {
backgroundColor: 'rgba(0,0,0,0.55)',
borderWidth: 0,
confine: true,
formatter: function (params: any) {
let tips = `<strong>${params[0].name}</strong></br>` // 标题加粗
params.forEach((item: any) => {
const value = item.value === 3.14159 ? '暂无数据' : Math.round(item.value * 100) / 100 // 处理特殊值
tips += `<div style=" display: flex;justify-content: space-between;">
<span>${item.marker}
${item.seriesName}:
</span> ${value}
</div>` // 统一格式
})
return tips
},
...(props.options?.tooltip || null)
},
toolbox: {