File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -559,7 +559,7 @@ describe('the range slider', function() {
559
559
} ) ;
560
560
} ) ;
561
561
562
- fdescribe ( 'yaxis options' , function ( ) {
562
+ describe ( 'yaxis options' , function ( ) {
563
563
564
564
it ( 'should be set one yaxis is present' , function ( ) {
565
565
var mock = {
@@ -792,6 +792,28 @@ describe('the range slider', function() {
792
792
} )
793
793
. then ( done ) ;
794
794
} ) ;
795
+
796
+ it ( 'should configure yaxis opts on relayout' , function ( done ) {
797
+ Plotly . plot ( gd , [ {
798
+ y : [ 2 , 1 , 2 ]
799
+ } ] , {
800
+ xaxis : { rangeslider : { yaxis : { range : [ - 10 , 20 ] } } }
801
+ } )
802
+ . then ( function ( ) {
803
+ expect ( gd . layout . xaxis . rangeslider . yaxis ) . toEqual ( { rangemode : 'fixed' , range : [ - 10 , 20 ] } ) ;
804
+
805
+ return Plotly . relayout ( gd , 'xaxis.rangeslider.yaxis.rangemode' , 'auto' ) ;
806
+ } )
807
+ . then ( function ( ) {
808
+ expect ( gd . layout . xaxis . rangeslider . yaxis ) . toEqual ( { rangemode : 'auto' , range : [ 0.9201631701631702 , 2.0798368298368297 ] } ) ;
809
+
810
+ return Plotly . relayout ( gd , 'xaxis.rangeslider.yaxis.rangemode' , 'match' ) ;
811
+ } )
812
+ . then ( function ( ) {
813
+ expect ( gd . layout . xaxis . rangeslider . yaxis ) . toEqual ( { rangemode : 'match' } ) ;
814
+ } )
815
+ . then ( done ) ;
816
+ } ) ;
795
817
} ) ;
796
818
} ) ;
797
819
You can’t perform that action at this time.
0 commit comments