试读部分
效果如图: 鼠标移上显示 vue3 - ts文件 “echarts”: “^5.4.3”, import { EChartsOption } from 'echarts'
import * as echarts from 'echarts/core'
import { TooltipComponent } from 'echarts/components'
import { TreeChart } from 'echarts/charts'
import { CanvasRenderer } from 'echarts/renderers'
echarts.use([TooltipComponent, TreeChart, CanvasRenderer])
export const treeOptions: EChartsOption = {
tooltip: {
trigger: 'item',
triggerOn: 'mousemove',
// 自定义数据
formatter: function (params) {
const data = params.data
const str = `
<div style="background:#FFF;display: flex;justify-content: space-between; gap:10px">
<div>
<p>设备名称:</p>
<p>设备编号:</p>
<p>设备状态:</p>
<p>最新读取时间:</p>
<p>最新读数:</p>
</div>
……
本文为 VIP 文章,已展示部分内容,
开通 VIP 后查看全文
觉得这篇文章有帮助?
点个赞,或赞赏支持作者持续创作