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

Comments

Projects
None yet
2 participants
@sylaince

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

This comment has been minimized.

Show comment
Hide comment
@pawelfus

pawelfus May 7, 2018

Contributor

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.

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.

@pawelfus pawelfus added the Bug label May 7, 2018

@sylaince

This comment has been minimized.

Show comment
Hide comment
@sylaince

sylaince May 7, 2018

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

sylaince commented May 7, 2018

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

@sylaince sylaince closed this May 7, 2018

@pawelfus

This comment has been minimized.

Show comment
Hide comment
@pawelfus

pawelfus May 7, 2018

Contributor

Thank you!

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

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

This comment has been minimized.

Show comment
Hide comment
@sylaince

sylaince May 7, 2018

That will be great!

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

This comment has been minimized.

Show comment
Hide comment
@pawelfus

pawelfus May 11, 2018

Contributor

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/

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