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

Tooltip is jiggling on arearange when followPointer is set to true #4984

Closed
Izothep opened this issue Feb 1, 2016 · 5 comments
Closed

Tooltip is jiggling on arearange when followPointer is set to true #4984

Izothep opened this issue Feb 1, 2016 · 5 comments
Assignees

Comments

@Izothep
Copy link
Contributor

Izothep commented Feb 1, 2016

Tooltip is jiggling on arearange after followPointer is set to true. Example of this behaviour:
http://jsfiddle.net/2a67qog8/4/

animation

It looks to be connected with value of arearange, when min is bigger than 0 everything works fine, probably connected with standard behaviour for tooltip at arearange:
http://jsfiddle.net/2a67qog8/5/

Edit: Highcharts have the same problem as Highstock with this behaviour:
http://jsfiddle.net/2a67qog8/6/

As a workaround it is possible to use tooltip.positioner for placing tooltip.
example: http://jsfiddle.net/2a67qog8/8/

@Izothep Izothep changed the title Highstock tooltip is jiggling on arearange when followPointer is set to true Tooltip is jiggling on arearange when followPointer is set to true Feb 1, 2016
@TorsteinHonsi
Copy link
Collaborator

Internal note:

When the tooltip is shared, it is supposed to follow the mouse's y position.

@jon-a-nygaard
Copy link
Contributor

It appears to be with the preferFarSide logic in Tooltip.getPosition()

preferFarSide = pick(point.ttBelow, (chart.inverted && !point.negative) || (!chart.inverted && point.negative))

The jiggling happens in this case when point.negative is true. Which seems to be the correct logic and behaviour. So not sure anymore if this is a "bug".

Also to note, I believe a potential simplification of this logic could be:

preferFarSide = pick(point.ttBelow, !chart.inverted === !!point.negative);

@pawelfus
Copy link
Contributor

Since we have followPointer set to true, then shouldn't preferFarSide be used at all?

@jon-a-nygaard
Copy link
Contributor

@pawelfus: I am thinking the same, when I set preferFarSide explicitly to false then it is behaving how I expected it.

@TorsteinHonsi
Copy link
Collaborator

This just in: The issue can also be seen on vanilla line charts, briefly when hovering over the negative point: http://jsfiddle.net/highcharts/zv5nc6xd/

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

No branches or pull requests

5 participants