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

Click events unreliable when multiple series are on a chart #5622

Closed
sontek opened this Issue Aug 25, 2016 · 3 comments

Comments

Projects
None yet
3 participants
@sontek

sontek commented Aug 25, 2016

Expected behaviour

The click event defined on a point should fire when it is clicked on for at least the very top series (by zIndex/index?)

Actual behaviour

The click event does not fire.

Live demo with steps to reproduce

Try to click the point in April to see the issue:

http://jsfiddle.net/agnHV/22/

Affected browser(s)

Chrome, Safari

@sontek

This comment has been minimized.

Show comment
Hide comment
@sontek

sontek Aug 25, 2016

Now that I've looked at some of the other issues more closely, I believe this might be related or the exact same issue:

#5402
#4698

sontek commented Aug 25, 2016

Now that I've looked at some of the other issues more closely, I believe this might be related or the exact same issue:

#5402
#4698

@sontek

This comment has been minimized.

Show comment
Hide comment
@sontek

sontek Aug 26, 2016

Here is an updated jsfiddle that shows the problem even more:

http://jsfiddle.net/agnHV/25/

You can see in April that if you click the points (2 stacked on top of each other) the one on bottom is triggered but the one on top is not.

sontek commented Aug 26, 2016

Here is an updated jsfiddle that shows the problem even more:

http://jsfiddle.net/agnHV/25/

You can see in April that if you click the points (2 stacked on top of each other) the one on bottom is triggered but the one on top is not.

@TorsteinHonsi TorsteinHonsi added Bug and removed Bug labels Aug 29, 2016

pawelfus added a commit that referenced this issue Sep 5, 2016

@pawelfus

This comment has been minimized.

Show comment
Hide comment
@pawelfus

pawelfus Sep 5, 2016

Contributor

Internal note:
Two things to mention:

  • It still doesn't work for a polar type series, demo: http://jsfiddle.net/71ek1mn5/1/ - this is caused by using only clientX here. Simple providing plotY or using kdAxisArray: ['clientX', 'polarPlotY']; doesn't resolve the issue. The problems are dist and distX, which are equall, so we hover top most series (always "Line 2"). With 4.2.6 version it looks a bit better ( http://jsfiddle.net/71ek1mn5/2/ ) - but still, only "Line 2" series gets event callbacks.
  • I refactored a bit runPointActions - now only one array is used kdpoints, which is sorted by distance, then sorted back to series order here. I'm not sure if sorting again is a good idea, instead we can use another array, with just points for tooltip..
Contributor

pawelfus commented Sep 5, 2016

Internal note:
Two things to mention:

  • It still doesn't work for a polar type series, demo: http://jsfiddle.net/71ek1mn5/1/ - this is caused by using only clientX here. Simple providing plotY or using kdAxisArray: ['clientX', 'polarPlotY']; doesn't resolve the issue. The problems are dist and distX, which are equall, so we hover top most series (always "Line 2"). With 4.2.6 version it looks a bit better ( http://jsfiddle.net/71ek1mn5/2/ ) - but still, only "Line 2" series gets event callbacks.
  • I refactored a bit runPointActions - now only one array is used kdpoints, which is sorted by distance, then sorted back to series order here. I'm not sure if sorting again is a good idea, instead we can use another array, with just points for tooltip..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment