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

Sankey chart crashes on update when addSeries was called with redraw=false #9300

Closed
anajavi opened this issue Nov 6, 2018 · 1 comment
Closed
Assignees

Comments

@anajavi
Copy link

anajavi commented Nov 6, 2018

Expected behaviour

Other series types can do:

var series = chart.addSeries(opts, false);
  
series.update({
  events: { }
}, false);
chart.redraw();

Actual behaviour

TypeError: Cannot read property 'concat' of undefined

Somehow this.points is undefined when addSeries was called with redraw set to false:

this.data = this.points.concat(this.nodes);

Live demo with steps to reproduce

https://jsfiddle.net/cm352rLt/7/

Product version

Highcharts 6.2.0

Affected browser(s)

All.

@TorsteinHonsi
Copy link
Collaborator

Thanks for reporting, it's fixed now.

Workaround

Add this snippet

Highcharts.seriesTypes.sankey.prototype.destroy = function () {
    // Nodes must also be destroyed (#8682, #9300)
    this.data = [].concat(this.points, this.nodes);
    Highcharts.Series.prototype.destroy.call(this);
};

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