@@ -2778,85 +2778,6 @@ describe('Hover on axes with rangebreaks', function() {
27782778 . then ( done ) ;
27792779 } ) ;
27802780
2781- it ( 'should work when rangebreaks are present on y-axis using hovermode x (case of bar and autorange reversed)' , function ( done ) {
2782- Plotly . plot ( gd , [ {
2783- type : 'bar' ,
2784- orientation : 'h' ,
2785- y : [
2786- '1970-01-01 00:00:00.000' ,
2787- '1970-01-01 00:00:00.010' ,
2788- '1970-01-01 00:00:00.050' ,
2789- '1970-01-01 00:00:00.090' ,
2790- '1970-01-01 00:00:00.095' ,
2791- '1970-01-01 00:00:00.100' ,
2792- '1970-01-01 00:00:00.150' ,
2793- '1970-01-01 00:00:00.190' ,
2794- '1970-01-01 00:00:00.200'
2795- ] ,
2796- x : [ 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ]
2797- } ] , {
2798- yaxis : {
2799- autorange : 'reversed' ,
2800- rangebreaks : [
2801- { bounds : [
2802- '1970-01-01 00:00:00.011' ,
2803- '1970-01-01 00:00:00.089'
2804- ] } ,
2805- { bounds : [
2806- '1970-01-01 00:00:00.101' ,
2807- '1970-01-01 00:00:00.189'
2808- ] }
2809- ]
2810- } ,
2811- width : 400 ,
2812- height : 400 ,
2813- margin : { l : 10 , t : 10 , b : 10 , r : 10 } ,
2814- hovermode : 'x'
2815- } )
2816- . then ( function ( ) {
2817- gd . on ( 'plotly_hover' , function ( d ) {
2818- eventData = d . points [ 0 ] ;
2819- } ) ;
2820- } )
2821- . then ( function ( ) { _hover ( 50 , 350 ) ; } )
2822- . then ( function ( ) {
2823- _assert ( '1st test' , {
2824- axis : '1' ,
2825- nums : 'Jan 1, 1970, 00:00:00.01' ,
2826- y : '1970-01-01 00:00:00.01' ,
2827- x : 1
2828- } ) ;
2829- } )
2830- . then ( function ( ) { _hover ( 200 , 200 ) ; } )
2831- . then ( function ( ) {
2832- _assert ( '2nd test' , {
2833- axis : '5' ,
2834- nums : 'Jan 1, 1970, 00:00:00.1' ,
2835- y : '1970-01-01 00:00:00.1' ,
2836- x : 5
2837- } ) ;
2838- } )
2839- . then ( function ( ) { _hover ( 250 , 150 ) ; } ) // hover over break
2840- . then ( function ( ) {
2841- _assert ( '3rd test' , {
2842- // previous values
2843- y : '1970-01-01 00:00:00.1' ,
2844- x : 5
2845- } , 'noHoverLabel' ) ;
2846- } )
2847- . then ( function ( ) { _hover ( 350 , 50 ) ; } )
2848- . then ( function ( ) {
2849- _assert ( '4th test' , {
2850- axis : '8' ,
2851- nums : 'Jan 1, 1970, 00:00:00.2' ,
2852- y : '1970-01-01 00:00:00.2' ,
2853- x : 8
2854- } ) ;
2855- } )
2856- . catch ( failTest )
2857- . then ( done ) ;
2858- } ) ;
2859-
28602781 it ( 'should work when rangebreaks are present on y-axis' , function ( done ) {
28612782 Plotly . plot ( gd , [ {
28622783 mode : 'lines' , // i.e. no autorange padding
0 commit comments