@@ -796,6 +796,8 @@ describe('Test histogram', function() {
796796 x : [ 1 , 2 , 3 ] , type : 'histogram'
797797 } , {
798798 x : [ 1 , 2 , 3 ] , type : 'histogram'
799+ } , {
800+ type : 'histogram'
799801 } ] )
800802 . then ( function ( ) {
801803 assertTraceCount ( 3 ) ;
@@ -834,32 +836,33 @@ describe('Test histogram', function() {
834836 Plotly . newPlot ( gd , [
835837 { type : 'histogram' , x : [ 1 ] } ,
836838 { 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' }
838841 ] )
839842 . then ( function ( ) {
840- _assertBinCenters ( [ [ 0 ] , [ 10 ] , [ 20 ] ] ) ;
843+ _assertBinCenters ( [ [ 0 ] , [ 10 ] , [ 20 ] , hidden ] ) ;
841844 return Plotly . restyle ( gd , 'visible' , 'legendonly' , [ 1 , 2 ] ) ;
842845 } )
843846 . then ( function ( ) {
844- _assertBinCenters ( [ [ 0 ] , hidden , hidden ] ) ;
847+ _assertBinCenters ( [ [ 0 ] , hidden , hidden , hidden ] ) ;
845848 return Plotly . restyle ( gd , 'visible' , false , [ 1 , 2 ] ) ;
846849 } )
847850 . then ( function ( ) {
848- _assertBinCenters ( [ [ 1 ] , hidden , hidden ] ) ;
851+ _assertBinCenters ( [ [ 1 ] , hidden , hidden , hidden ] ) ;
849852 return Plotly . restyle ( gd , 'visible' , [ false , false , true ] ) ;
850853 } )
851854 . then ( function ( ) {
852- _assertBinCenters ( [ hidden , hidden , [ 20 , 21 ] ] ) ;
855+ _assertBinCenters ( [ hidden , hidden , [ 20 , 21 ] , hidden ] ) ;
853856 return Plotly . restyle ( gd , 'visible' , [ false , true , false ] ) ;
854857 } )
855858 . then ( function ( ) {
856- _assertBinCenters ( [ hidden , [ 10.1 , 10.3 ] , hidden ] ) ;
859+ _assertBinCenters ( [ hidden , [ 10.1 , 10.3 ] , hidden , hidden ] ) ;
857860 // only one trace is visible, despite traces being grouped
858861 expect ( gd . _fullLayout . bargap ) . toBe ( 0 ) ;
859862 return Plotly . restyle ( gd , 'visible' , [ 'legendonly' , true , 'legendonly' ] ) ;
860863 } )
861864 . then ( function ( ) {
862- _assertBinCenters ( [ hidden , [ 10 ] , hidden ] ) ;
865+ _assertBinCenters ( [ hidden , [ 10 ] , hidden , hidden ] ) ;
863866 // legendonly traces still flip us back to gapped
864867 expect ( gd . _fullLayout . bargap ) . toBe ( 0.2 ) ;
865868 } )
0 commit comments