File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ var Plotly = require ( '@lib/index' ) ;
12var Plots = require ( '@src/plots/plots' ) ;
23var Lib = require ( '@src/lib' ) ;
34
45var supplyDefaults = require ( '@src/traces/histogram2d/defaults' ) ;
56var 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
812describe ( '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} ) ;
You can’t perform that action at this time.
0 commit comments