antvis/G2

折线图添加brush交互后,线点击事件只能触发一次,之后再也不可以触发 #3705

observerzy posted onGitHub

  • I have searched the issues of this repository and believe that this is not a duplicate.

https://g2.antv.vision/zh/examples/case/line#line8

Steps to reproduce

折线图添加代码
chart.interaction('brush') chart.on("line:click",()=>{ console.log("click line") })

Environment Info
g2 4.1.32
System mac
Browser chrome

image

设置了brush后,图表上line:click、plot:click事件触发一次后就不再触发,但是其mouseenter事件正常

<!-- generated by antv-issue-helper. DO NOT REMOVE -->


+1,我也遇到相同的问题了👀

posted by WHChen-Alex over 3 years ago

+1 设置了brush后可以判断获取到的width,width为0是就是单击事件,可以每次都触发。。🐶

posted by zzyundragon over 3 years ago

+1,我也遇到相同的问题了👀

posted by Dawnwangzi about 3 years ago

+1 设置了brush后可以判断获取到的width,width为0是就是单击事件,可以每次都触发。。🐶

demo写出来了, 之后, 怎么获取到点击的是哪个point?

posted by renjihua over 2 years ago

可以看看 G2 5.0 的案例是否有相同的问题。

posted by pearmini 11 months ago

Fund this Issue

$0.00
Funded

Pull requests