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

States with no data assigned to them remain on the plot as a part of a new series after update #7162

Closed
kamilkulig opened this issue Sep 18, 2017 · 1 comment
Labels
Product: Highcharts Maps Status: Stale This issue hasn't had any activity for a while, and will be auto-closed if no further updates occur.

Comments

@kamilkulig
Copy link
Contributor

kamilkulig commented Sep 18, 2017

Expected behaviour

After series update all parts of the previous data should be removed from the plot area.

Actual behaviour

States with no data assigned to them remain on the plot as a part of a new series after update. Only the ones with data disappear as expected.

Live demo with steps to reproduce

http://jsfiddle.net/kkulig/hvrmdxx6/

Click Hawai from select list. All states except Worcester (the only one that had a value) are merged into the current map data - click the legend item to examine that.

If we replace the update code:
the_map.series[0].update(series);

with this code:

the_map.series[0].remove(false)
the_map.addSeries(series);

everything works fine:
http://jsfiddle.net/kkulig/qtvnpcu2/

EDIT

It seems that Highcharts modifies the data array by adding paths to it:
http://jsfiddle.net/kkulig/bw662epx/

If we do data.slice() every time before we pass it to a new series this problem doesn't occur:
http://jsfiddle.net/kkulig/66oex4d5/

END OF EDIT

@stale
Copy link

stale bot commented Oct 8, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions!

@stale stale bot added the Status: Stale This issue hasn't had any activity for a while, and will be auto-closed if no further updates occur. label Oct 8, 2019
@stale stale bot closed this as completed Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Product: Highcharts Maps Status: Stale This issue hasn't had any activity for a while, and will be auto-closed if no further updates occur.
Projects
None yet
Development

No branches or pull requests

2 participants