Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

annotation().html绘制标注后,监听对应的 annotation-html:click事件无反应 #3881

Closed
loofk opened this issue Apr 19, 2022 · 1 comment

Comments

@loofk
Copy link

loofk commented Apr 19, 2022

如标题所示

@hustcc
Copy link
Member

hustcc commented Jun 22, 2022

chart.ele.addEventListener('click', (e) => {
  console.log(e);
  // 然后通过 e 过滤出 annotation-html
});

因为 html 最终是绘制在 dom 上,已经脱离了 canvas,所以建议改成上面的写法,其实就是最原始的 html 事件监听的方式。

@hustcc hustcc closed this as completed Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants