在 ECharts 中,可以使用 series 的 tooltip 属性来控制是否显示 tooltip,通过设置 tooltip 属性的 show 属性为 false,可以禁用某个特定系列的 tooltip。
以下是一个示例配置,展示了如何禁用 pictorialBar 系列的 tooltip,同时保留其他系列的 tooltip:
在上述示例中,我们通过设置 pictorialBar 系列的 tooltip 的 show 属性为 false,禁用了该系列的 tooltip。
option = {
// 其他配置项...
series: [
{
type: 'bar',
// bar 系列的配置...
},
{
type: 'bar',
// bar 系列的配置...
},
{
type: 'pictorialBar',
tooltip: {
show: false // 禁用 pictorialBar 系列的 tooltip
},
// pictorialBar 系列的配置...
}
]
};