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

Cannot get click event when clicking on bar chart with option {large: true} #10699

Closed
ruixuel opened this issue Jun 18, 2019 · 1 comment · Fixed by OpenTMI/opentmi-default-gui#32 or DeviaVir/zenbot#2011 · May be fixed by dyna-dot/iClient-JavaScript-s#1
Labels
bug en This issue is in English

Comments

@ruixuel
Copy link

ruixuel commented Jun 18, 2019

Version

4.2.1

Steps to reproduce

  1. create a bar chart with option {large: true}
  2. add click event handler on the bar chart
  3. when clicking on the bar chart, the click handler cannot get the event

What is expected?

The click handler for large bar chart can get event

What is actually happening?

The click handler cannot get click event when clicking on the large bar chart. When zooming in to certain level, then click event works.


I debug the source code, and find the problem is caused by the code in echarts.js line: 1402. Since clicking on large bar chart cannot get dataIndex, so the params is undefined which causes the event will not be triggered. Our requirement is to get the event no matter the params contains dataIndex or not. We also tried to bind the native event to chart container. But somehow, it sometimes has conflict with some chart events, ex: brush, drag, etc. Could you help to solve this problem? Thank you!

@echarts-bot
Copy link

echarts-bot bot commented Jun 18, 2019

Hi! We've received your issue and please be patient to get responded. 🎉
The average response time is expected to be within one day for weekdays.

In the meanwhile, please make sure that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer.

Have a nice day! 🍵

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug en This issue is in English
Projects
None yet
2 participants