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

Highstock - calling chart update method breaks stock-tools. #9740

Closed
flare256 opened this issue Dec 20, 2018 · 2 comments
Closed

Highstock - calling chart update method breaks stock-tools. #9740

flare256 opened this issue Dec 20, 2018 · 2 comments

Comments

@flare256
Copy link

Expected behaviour

Chart.update call should not affect stock-tools functionality in the case of options which don't touch stock-tools settings.

Actual behaviour

Update call with empty options object as argument is breaking (broken onClick listener?) stock-tools.

Live demo with steps to reproduce

http://jsfiddle.net/t8v2eh4y/
For eg. if you want to draw a line when you click on adequate icon, nothing happens when you hover and then click on the chart area.

Product version

Highstock 7.0.1

Affected browser(s)

Tested on Google Chrome 71.0.3578.98 (64-bit)

@KacperMadej
Copy link

Hi @flare256

Thank you for reporting about the bug.
Workaround - manually reset events through chart.navigationBindings.update().
Demo: http://jsfiddle.net/BlackLabel/7fqskgun/

Internal note:
stockToolbar is being recreated (destroy current + create new) on each chart update, but events are not. Looks like navigationBindings.update should be called at some point.

Extras:

  • there's a typo highcharts-highcharts-zoom-y in stock-tools blocking zoom Y.
  • is Navigatorion in stock-tools not a typo?

@pawelfus
Copy link
Contributor

pawelfus commented Jan 2, 2019

Internal note:
It's probably a result of splitting stockTools and bindings. Bindings used to be updated with stockTools, now update needs to be called directly.

@pawelfus pawelfus self-assigned this Jan 2, 2019
pawelfus added a commit that referenced this issue Jan 2, 2019
pawelfus added a commit that referenced this issue Jan 4, 2019
…avigationBindings.update()` to follow common pattern in updates. Added navigation mixin to share logic between bindings and exporting.
TorsteinHonsi pushed a commit that referenced this issue Jan 7, 2019
…avigationBindings.update()` to follow common pattern in updates. Added navigation mixin to share logic between bindings and exporting.
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

3 participants