yzhang921 opened a new issue #10549: Tooltip HTML 不能调用外部函数 URL: https://github.com/apache/incubator-echarts/issues/10549 本想在formatter生成的html中增加一个事件触发,调用外部函数做一些事情,发现该作用域里面调用不到任何外部函数 ``` tooltip: { trigger: 'item', enterable: true, triggerOn: 'click', formatter(params) { let {name, value} = params; let res = `${name}~${mainMetric} : ${value}<br/>`; ... let callBack = function () { .... }; res += `<span style="color:#bbe1ff;float:right;cursor:pointer" onclick="callBack">触发</span>`; return res; } }, ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
