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

Error on series.update of a series with linked series #6734

Closed
rredondoo opened this issue May 16, 2017 · 1 comment
Closed

Error on series.update of a series with linked series #6734

rredondoo opened this issue May 16, 2017 · 1 comment

Comments

@rredondoo
Copy link

Expected behaviour

Use Series.update(options, boolean) with empty series (a series with no data that serves as a container) that has other series linked to it

Actual behaviour

When using series.update() it throws an error:
VM626 highstock.js:392 Uncaught TypeError: Cannot read property 'options' of undefined

I think what happens is that during the execution of series.update(), at some point a "Navigator" series is being linked to the series that is being updated, then the link is deleted leaving an empty object linked to the series, and then setVisible() tries to read the property of that empty object.

Live demo with steps to reproduce

https://jsfiddle.net/rredondo/xxkmg51y/

  1. Click on the legend "Series 1 & 2".
  2. Open console to see error.

This only happens when a series that is linked to another series is shown in the navigator. That is, if you set the property showInNavigator to false of "Series 1", then everything works fine.

Affected browser(s)

I've tested it on Chrome and Firefox (latest releases).

@pawelfus
Copy link
Contributor

pawelfus commented May 16, 2017

Thank you for reporting this!

Workaround:
After updating series, use this.chart.linkSeries(), demo: https://jsfiddle.net/5gv869an/

Internal note:
It looks like linkedTo forces navigator series to hide before series is linked to the parent. What is strange: even redraw=true doesn't resolve the issue.

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