网站如何与域名绑定,平顶山建站公司,做电影网站 资源去哪里找,商标设计用什么软件1. 通过 myChart.getZr().on(click, fn) 监听整个图表的点击事件#xff0c;注册回调 myChart.getZr().on(click, () {//拿到index即可取出被点击数据的所有信息console.log(clickIndex)
}) 2. 在 tooltip 的 formatter 函数中#xff0c;每次调用都记录下需要的参数click, fn) 监听整个图表的点击事件注册回调 myChart.getZr().on(click, () {//拿到index即可取出被点击数据的所有信息console.log(clickIndex)
}) 2. 在 tooltip 的 formatter 函数中每次调用都记录下需要的参数一般取dataIndex在回调中使用参数 var clickIndex
let option {tooltip: axis,formatter: val {clickIndex val[0].dataIndexreturn tooltip}
} 参考: https://github.com/apache/incubator-echarts/issues/4375 转载于:https://www.cnblogs.com/qimeng/p/10238485.html