forked from highcharts/highcharts
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed highcharts#9803, networkgraph throwing maximum call stack error…
… with cyclical links.
- Loading branch information
1 parent
cff8d96
commit 4d2d274
Showing
4 changed files
with
44 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
samples/unit-tests/series-networkgraph/networkgraph/demo.details
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
resources: | ||
- https://code.jquery.com/qunit/qunit-2.0.1.js | ||
- https://code.jquery.com/qunit/qunit-2.0.1.css | ||
js_wrap: b | ||
... |
7 changes: 7 additions & 0 deletions
7
samples/unit-tests/series-networkgraph/networkgraph/demo.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<script src="https://code.highcharts.com/highcharts.js"></script> | ||
<script src="https://code.highcharts.com/modules/networkgraph.js"></script> | ||
|
||
<div id="qunit"></div> | ||
<div id="qunit-fixture"></div> | ||
|
||
<div id="container"></div> |
23 changes: 23 additions & 0 deletions
23
samples/unit-tests/series-networkgraph/networkgraph/demo.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
QUnit.test('Network Graph', function (assert) { | ||
var chart = Highcharts.chart('container', {}); | ||
|
||
chart.addSeries({ | ||
layoutAlgorithm: { | ||
enableSimulation: false | ||
}, | ||
keys: ['from', 'to'], | ||
data: [ | ||
['A', 'B'], | ||
['B', 'A'], | ||
['C', 'A'] | ||
], | ||
type: 'networkgraph' | ||
}); | ||
|
||
assert.strictEqual( | ||
chart.series[0].points.length, | ||
3, | ||
'Series successfully added' | ||
); | ||
|
||
}); |