Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed #5631, zeroes in logarithmic chart made the whole graph crash.
- Loading branch information
1 parent
5203670
commit 7b4ceac
Showing
7 changed files
with
59 additions
and
8 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
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
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
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
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,5 @@ | ||
--- | ||
resources: | ||
- https://code.jquery.com/qunit/qunit-1.19.0.js | ||
- https://code.jquery.com/qunit/qunit-1.19.0.css | ||
... |
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/stock/highstock.js"></script> | ||
|
||
|
||
<div id="qunit"></div> | ||
<div id="qunit-fixture"></div> | ||
|
||
<div id="container" style="width: 600px; margin: 0 auto"></div> |
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,43 @@ | ||
$(function () { | ||
|
||
QUnit.test('NaN in graphs', function (assert) { | ||
var chart = Highcharts.chart('container', { | ||
|
||
series: [{ | ||
data: [NaN, 71.5, 106.4, 129.2, 144.0, NaN, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4] | ||
}] | ||
|
||
}); | ||
|
||
assert.ok( | ||
chart.series[0].graph.attr('d').length > 100, | ||
'Path is ok' | ||
); | ||
assert.notEqual( | ||
chart.series[0].graph.attr('d'), | ||
'M 0 0', | ||
'Path is ok' | ||
); | ||
}); | ||
|
||
QUnit.test('Zeroes on log axis', function (assert) { | ||
|
||
var chart = Highcharts.chart('container', { | ||
|
||
yAxis: { | ||
type: 'logarithmic' | ||
}, | ||
|
||
series: [{ | ||
data: [1, 2, 0, 8, 16, 32, 64, 128, 256, 512], | ||
pointStart: 1 | ||
}] | ||
}); | ||
|
||
assert.strictEqual( | ||
chart.series[0].graph.attr('d').split(' ')[6], | ||
'M', | ||
'Gap detected' | ||
); | ||
}); | ||
}); |