We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
G2 Version: 4.1.16
Platform: Chrome
Mini Showcase(like screenshots):
CodePen Link:
在使用getEngine创建自定义label时,添加label的点击事件:chart.on('label:click', ev => { console.log(ev.data) }), 此时的data返回的是undefined。
The text was updated successfully, but these errors were encountered:
可以看看 ev 中的 target 中是有对应的数据的。
Sorry, something went wrong.
target中确实有数据,但是那个数据不完整,不能返回label对应的所有原始数据,而返回的是点击区域的数据。 比如我点击“事例7”,返回的就是“事例7”以及其他相关信息,但是拿不到“事例7”对应的数值。
可以通过拿到的 “事例7” 去原始数据中找到自己要的数据。因为图形和 label 的绘制是基本分离的,所以有一定的隔离。
No branches or pull requests
G2 Version: 4.1.16
Platform: Chrome
Mini Showcase(like screenshots):
CodePen Link:
在使用getEngine创建自定义label时,添加label的点击事件:chart.on('label:click', ev => { console.log(ev.data) }), 此时的data返回的是undefined。
The text was updated successfully, but these errors were encountered: