由于项目需要,点击图例展示弹窗,不需要默认隐藏点击的数据 - 监听图例的legendselectchanged事件 chart.on('legendselectchanged', (params) => { // 处理自己的自定义事件 *** // 阻止默认事件(原理就是将点击的图例重新选中) chart.dispatchAction({ type: 'legendSelect', name: params.name }); });