8000 #313 populate searchdata even if hoverinfo === 'none' by monfera · Pull Request #2 · monfera/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

#313 populate searchdata even if hoverinfo === 'none' #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
plotly#313 adding a test case for preexisting option "hoverinfo" : "n…
…one"
  • Loading branch information
monfera committed Apr 13, 2016
commit 21fdedde26afd8837b5a0c8c9c0382f4d0b41c05
25 changes: 25 additions & 0 deletions test/jasmine/tests/hover_label_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,31 @@ describe('hover info', function() {
});
});

describe('hover info none', function() {
var mockCopy = Lib.extendDeep({}, mock);

mockCopy.data[0].hoverinfo = 'none';

beforeEach(function(done) {
Plotly.plot(createGraphDiv(), mockCopy.data, mockCopy.layout).then(done);
});

it('does not render if hover is set to none', function() {
var gd = document.getElementById('graph');
Fx.hover('graph', evt, 'xy');

var hoverTrace = gd._hoverdata[0];

expect(hoverTrace.curveNumber).toEqual(0);
expect(hoverTrace.pointNumber).toEqual(17);
expect(hoverTrace.x).toEqual(0.388);
expect(hoverTrace.y).toEqual(1);

expect(d3.selectAll('g.axistext').size()).toEqual(0);
expect(d3.selectAll('g.hovertext').size()).toEqual(0);
});
});

describe('hoverformat', function() {

var data = [{
Expand Down
0