Skip to content

Commit 3c390ac

Browse files
committed
add histogram2dcontour relayout test
1 parent 92a3061 commit 3c390ac

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

test/jasmine/tests/histogram2d_test.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
var Plotly = require('@lib/index');
12
var Plots = require('@src/plots/plots');
23
var Lib = require('@src/lib');
34

45
var supplyDefaults = require('@src/traces/histogram2d/defaults');
56
var calc = require('@src/traces/histogram2d/calc');
67

8+
var createGraphDiv = require('../assets/create_graph_div');
9+
var destroyGraphDiv = require('../assets/destroy_graph_div');
10+
var fail = require('../assets/fail_test');
711

812
describe('Test histogram2d', function() {
913
'use strict';
@@ -132,4 +136,26 @@ describe('Test histogram2d', function() {
132136
]);
133137
});
134138
});
139+
140+
describe('relayout interaction', function() {
141+
142+
afterEach(destroyGraphDiv);
143+
144+
it('should update paths on zooms', function(done) {
145+
var gd = createGraphDiv();
146+
147+
Plotly.newPlot(gd, [{
148+
type: 'histogram2dcontour',
149+
x: [1, 1, 2, 2, 3],
150+
y: [0, 1, 1, 1, 3]
151+
}])
152+
.then(function() {
153+
return Plotly.relayout(gd, 'xaxis.range', [0, 2]);
154+
})
155+
.catch(fail)
156+
.then(done);
157+
});
158+
159+
});
160+
135161
});

0 commit comments

Comments
 (0)