@@ -796,6 +796,8 @@ describe('Test histogram', function() {
796
796
x : [ 1 , 2 , 3 ] , type : 'histogram'
797
797
} , {
798
798
x : [ 1 , 2 , 3 ] , type : 'histogram'
799
+ } , {
800
+ type : 'histogram'
799
801
} ] )
800
802
. then ( function ( ) {
801
803
assertTraceCount ( 3 ) ;
@@ -834,32 +836,33 @@ describe('Test histogram', function() {
834
836
Plotly . newPlot ( gd , [
835
837
{ type : 'histogram' , x : [ 1 ] } ,
836
838
{ type : 'histogram' , x : [ 10 , 10.1 , 10.2 , 10.3 ] } ,
837
- { type : 'histogram' , x : [ 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 21 ] }
839
+ { type : 'histogram' , x : [ 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 20 , 21 ] } ,
840
+ { type : 'histogram' }
838
841
] )
839
842
. then ( function ( ) {
840
- _assertBinCenters ( [ [ 0 ] , [ 10 ] , [ 20 ] ] ) ;
843
+ _assertBinCenters ( [ [ 0 ] , [ 10 ] , [ 20 ] , hidden ] ) ;
841
844
return Plotly . restyle ( gd , 'visible' , 'legendonly' , [ 1 , 2 ] ) ;
842
845
} )
843
846
. then ( function ( ) {
844
- _assertBinCenters ( [ [ 0 ] , hidden , hidden ] ) ;
847
+ _assertBinCenters ( [ [ 0 ] , hidden , hidden , hidden ] ) ;
845
848
return Plotly . restyle ( gd , 'visible' , false , [ 1 , 2 ] ) ;
846
849
} )
847
850
. then ( function ( ) {
848
- _assertBinCenters ( [ [ 1 ] , hidden , hidden ] ) ;
851
+ _assertBinCenters ( [ [ 1 ] , hidden , hidden , hidden ] ) ;
849
852
return Plotly . restyle ( gd , 'visible' , [ false , false , true ] ) ;
850
853
} )
851
854
. then ( function ( ) {
852
- _assertBinCenters ( [ hidden , hidden , [ 20 , 21 ] ] ) ;
855
+ _assertBinCenters ( [ hidden , hidden , [ 20 , 21 ] , hidden ] ) ;
853
856
return Plotly . restyle ( gd , 'visible' , [ false , true , false ] ) ;
854
857
} )
855
858
. then ( function ( ) {
856
- _assertBinCenters ( [ hidden , [ 10.1 , 10.3 ] , hidden ] ) ;
859
+ _assertBinCenters ( [ hidden , [ 10.1 , 10.3 ] , hidden , hidden ] ) ;
857
860
// only one trace is visible, despite traces being grouped
858
861
expect ( gd . _fullLayout . bargap ) . toBe ( 0 ) ;
859
862
return Plotly . restyle ( gd , 'visible' , [ 'legendonly' , true , 'legendonly' ] ) ;
860
863
} )
861
864
. then ( function ( ) {
862
- _assertBinCenters ( [ hidden , [ 10 ] , hidden ] ) ;
865
+ _assertBinCenters ( [ hidden , [ 10 ] , hidden , hidden ] ) ;
863
866
// legendonly traces still flip us back to gapped
864
867
expect ( gd . _fullLayout . bargap ) . toBe ( 0.2 ) ;
865
868
} )
0 commit comments