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

marker's position don't follow the series when highstock chart is scrolling #8284

Closed
sylaince opened this issue May 4, 2018 · 5 comments
Closed
Assignees

Comments

@sylaince
Copy link

sylaince commented May 4, 2018

Expected behaviour

create a highstock chart with two serieses, when mouse over marker and tooltip will display, don't move the mouse and all the markers are following the movement of the series when chart is scrolling

Actual behaviour

one of the markers didn't follow the movement of its series
screenshot: https://i.stack.imgur.com/L8FJZ.jpg

Live demo with steps to reproduce

https://jsfiddle.net/sylaince/fz7cv853/3/
put your mouse over the top right or bottom right area of the chart would help reproducte the problem.

Product version

Highstock-6.1.0

Affected browser(s)

Chrome 66.0.3359.139

@pawelfus
Copy link
Contributor

pawelfus commented May 7, 2018

Hi @sylaince

Thank you for reporting this bug. You are right, both markers should follow last hovered point, the same way it works for just one series: https://jsfiddle.net/BlackLabel/fz7cv853/6/

Workaround:
Update states by plugin: https://jsfiddle.net/BlackLabel/fz7cv853/11/

Plugin:

(function(H) {
  H.wrap(H.Pointer.prototype, 'reset', function(proceed, allowMove, delay) {

    proceed.call(this, Array.prototype.slice.call(arguments, 1));

    if (this.chart.tooltip && allowMove && this.chart.hoverPoints) {
      H.each(this.chart.hoverPoints, function(hoverPoint) {
        hoverPoint.setState(hoverPoint.state, true);
      });
    }
  })
})(Highcharts)

Internal note:
Only hoverPoint gets it's state refreshed, not all hoverPoints.

@sylaince
Copy link
Author

sylaince commented May 7, 2018

It's completely resolved, thanks for your awesome work!

@sylaince sylaince closed this as completed May 7, 2018
@pawelfus
Copy link
Contributor

pawelfus commented May 7, 2018

Thank you!

Let's keep this open - I think this should be fixed in the core.

@pawelfus pawelfus reopened this May 7, 2018
@sylaince
Copy link
Author

sylaince commented May 7, 2018

That will be great!

@pawelfus pawelfus self-assigned this May 7, 2018
pawelfus added a commit that referenced this issue May 11, 2018
@pawelfus
Copy link
Contributor

pawelfus commented May 11, 2018

Internal note:
Just an idea of a fix. Still test needed, no PR yet. Tested on: http://jsfiddle.net/BlackLabel/76BuG/8/ and http://jsfiddle.net/BlackLabel/76BuG/7/

pawelfus added a commit that referenced this issue Jul 9, 2018
pawelfus added a commit that referenced this issue Jul 9, 2018
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

2 participants