ECharts emphasis label 显示节点数据

ECharts About 438 words

emphasis label

当鼠标或手指hover到指定节点时,显示该节点的数据。

当鼠标或手指hover到指定legend图例时,显示该图形所有节点的数据。

设置seriesemphasis对象的label中的show属性为true

const option = {
    legend: {
        type: 'scroll',
        left: '5%',
    },
    series: [{
        type: 'line',
        data: [...],
        emphasis: {
            label: {
                show: true,
            },
        },
    }]
};

文档

https://echarts.apache.org/zh/option.html#series-line.emphasis.label

Views: 4 · Posted: 2026-03-03

———         Thanks for Reading         ———

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓
Prev Post
Today In History
Browsing Refresh