Skip to content

Commit 1d61cf0

Browse files
committed
add test to lock issue 6407
1 parent 3d1e86f commit 1d61cf0

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

test/jasmine/tests/scatter_test.js

+21
Original file line numberDiff line numberDiff line change
@@ -1035,6 +1035,27 @@ describe('end-to-end scatter tests', function() {
10351035
.then(done, done.fail);
10361036
});
10371037

1038+
it('updates line segments on redraw when having null values', function(done) {
1039+
function checkSegments(exp, msg) {
1040+
var lineSelection = d3Select(gd).selectAll('.scatterlayer .js-line');
1041+
expect(lineSelection.size()).toBe(exp, msg);
1042+
}
1043+
1044+
Plotly.newPlot(gd, [{
1045+
y: [1, null, 2, 3],
1046+
mode: 'lines+markers'
1047+
}])
1048+
.then(function() {
1049+
checkSegments(2, 'inital');
1050+
1051+
return Plotly.relayout(gd, 'xaxis.range', [0, 10]);
1052+
})
1053+
.then(function() {
1054+
checkSegments(2, 'after redraw');
1055+
})
1056+
.then(done, done.fail);
1057+
});
1058+
10381059
it('correctly autoranges fill tonext traces across multiple subplots', function(done) {
10391060
Plotly.newPlot(gd, [
10401061
{y: [3, 4, 5], fill: 'tonexty'},

0 commit comments

Comments
 (0)