Mawia HL
Mawia HL

Reputation: 3665

Highchart networkgraph and area chart conflict

I was trying to put two highcharts charts- networkgraph and area chart in a page. But the area chart not working at all. The console gives the following errors:

> TypeError: link is null

See the fiddle https://jsfiddle.net/mawiahl/4vkbe63m/10/

If I delete the networkgraph code, the area chart works fine.

Upvotes: 0

Views: 91

Answers (1)

raf18seb
raf18seb

Reputation: 2146

When you add afterSetOptions event, it is iterating through all series (included area chart series) when it should only through networkgraph series. Adding simple if statement will solve the problem.

if (e.options.seriesType === 'networkgraph') {
  ...
}

https://jsfiddle.net/BlackLabel/gw5rucdz

Upvotes: 2

Related Questions