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

Highlighting of points disappears when updating yAxis on mouseover event over point in chart #12569

Closed
marek-aguita opened this issue Dec 4, 2019 · 4 comments · Fixed by #13512
Assignees

Comments

@marek-aguita
Copy link

marek-aguita commented Dec 4, 2019

Expected behaviour

Highlighting of points works exactly the same way as without any yAxis modification.

Actual behaviour

Highlighting of points somehow disappears when attempting to change some styles of an yAxis and hovering over a point in such modified chart. It looks like it is there for a millisecond, but then it's gone.

Live demo with steps to reproduce

https://jsfiddle.net/8k1zqd3x/27/
First chart in the demo contains yAxis.update call with some styling modifications. There is no permanent highlight in this scenario, as per this picture:
image

Second chart has yAxis.update code commented out, the highlight feature works properly:
image

Product version

Highcharts 7.2.1

Affected browser(s)

all

@pawelfus
Copy link
Contributor

pawelfus commented Dec 5, 2019

Thanks for reporting this issue @vodess

Bisected to commit 5e23ec2

FYI @jon-a-nygaard

@pawelfus
Copy link
Contributor

Internal note:
Most likely issue comes from these lines: 5e23ec2#diff-6a484c602b63f88ee9f97efd254ee22fR299-R303

Perhaps, when hoverPoint is the same, we don't need to fire these events.

@sebastianbochan
Copy link
Contributor

sebastianbochan commented Apr 14, 2020

Internal note
After deep debugging it looks like more complex issue, because of two problems here:

  1. The setState is always triggered with "move" param, which causes the issue with halo.
    hoverPoint.setState(hoverPoint.state, true);

Its related with commit e3f4302 and bug #2500

Its a regression, but Im not sure how to detect the "move". My idea is to check the extremes on axis, but it sounds as workaround, not solution.

  1. When we trigger:
    2.1 setState('hover')
    2.2 axis.update({});

    Demo:
    - http://jsfiddle.net/BlackLabel/jvkw8m93/

    Then hover marker is lost.

@TorsteinHonsi any ideas?

@TorsteinHonsi
Copy link
Collaborator

No... I guess we need to go to the offending commits and see why it now fails. Checking the extremes of the axis indeed seems like a workaround - we should have to add new conditions, just find out what made it work earlier, and why that was lost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants