Skip to content

Commit 313fec0

Browse files
authored
Add test for plotly#6614
1 parent 5124e45 commit 313fec0

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

test/jasmine/tests/hover_label_test.js

+35
Original file line numberDiff line numberDiff line change
@@ -4725,6 +4725,41 @@ describe('hovermode: (x|y)unified', function() {
47254725
})
47264726
.then(done, done.fail);
47274727
});
4728+
4729+
it('should not fail if only hoverinfo: "none" are current visible', function(done) {
4730+
Plotly.newPlot(gd, {
4731+
data: [{
4732+
name: 'A',
4733+
x: [1,100],
4734+
y: [1, 1]
4735+
}, {
4736+
name: 'B',
4737+
y: [1],
4738+
x:[50],
4739+
hoverinfo: 'none'
4740+
}],
4741+
layout: {
4742+
xaxis: {range: [40,60]},
4743+
hovermode: 'x unified',
4744+
showlegend: false,
4745+
width: 500,
4746+
height: 500,
4747+
margin: {
4748+
t: 50,
4749+
b: 50,
4750+
l: 50,
4751+
r: 50
4752+
}
4753+
}
4754+
})
4755+
.then(function() {
4756+
_hover(gd, { xpx: 200, ypx: 200 });
4757+
4758+
expect(gd._hoverdata, undefined);
4759+
assertHoverLabelContent({});
4760+
})
4761+
.then(done, done.fail);
4762+
});
47284763

47294764
it('y unified should work for x/y cartesian traces', function(done) {
47304765
var mockCopy = Lib.extendDeep({}, mock);

0 commit comments

Comments
 (0)