@@ -2378,7 +2378,7 @@ describe('hover info on stacked subplots', function() {
2378
2378
} ) ;
2379
2379
} ) ;
2380
2380
2381
- describe ( 'hover on subplots when hoversameaxis is set to true and x hovermode ' , function ( ) {
2381
+ describe ( 'hover on subplots when hoversameaxis is set to true and x hovermodes ' , function ( ) {
2382
2382
'use strict' ;
2383
2383
2384
2384
var mock = {
@@ -2421,7 +2421,7 @@ describe('hover on subplots when hoversameaxis is set to true and x hovermode',
2421
2421
2422
2422
afterEach ( destroyGraphDiv ) ;
2423
2423
2424
- it ( 'hovermode: x with hoversameaxis: true' , function ( ) {
2424
+ it ( 'hovermode: *x* | *x unified* with hoversameaxis: true' , function ( ) {
2425
2425
var pos = 0 ;
2426
2426
var subplot = 'xy' ;
2427
2427
Lib . clearThrottle ( ) ;
@@ -2456,10 +2456,17 @@ describe('hover on subplots when hoversameaxis is set to true and x hovermode',
2456
2456
name : [ 'trace 0' , 'trace 1' , 'trace 2' ] ,
2457
2457
axis : String ( pos )
2458
2458
} ) ;
2459
+
2460
+ Plotly . relayout ( gd , 'hovermode' , 'x unified' ) ;
2461
+ pos = 0 ;
2462
+ subplot = 'xy' ;
2463
+ Lib . clearThrottle ( ) ;
2464
+ Plotly . Fx . hover ( gd , { xval : pos } , subplot ) ;
2465
+ expect ( gd . _hoverdata . length ) . toBe ( 3 ) ;
2459
2466
} ) ;
2460
2467
} ) ;
2461
2468
2462
- describe ( 'hover on subplots when hoversameaxis is set to true and y hovermode ' , function ( ) {
2469
+ describe ( 'hover on subplots when hoversameaxis is set to true and y hovermodes ' , function ( ) {
2463
2470
'use strict' ;
2464
2471
2465
2472
var mock = {
@@ -2502,7 +2509,7 @@ describe('hover on subplots when hoversameaxis is set to true and y hovermode',
2502
2509
2503
2510
afterEach ( destroyGraphDiv ) ;
2504
2511
2505
- it ( 'hovermode: y with hoversameaxis: true' , function ( ) {
2512
+ it ( 'hovermode: *y* | *y unified* with hoversameaxis: true' , function ( ) {
2506
2513
var pos = 0 ;
2507
2514
var subplot = 'xy' ;
2508
2515
Lib . clearThrottle ( ) ;
@@ -2537,6 +2544,13 @@ describe('hover on subplots when hoversameaxis is set to true and y hovermode',
2537
2544
name : [ 'trace 0' , 'trace 1' , 'trace 2' ] ,
2538
2545
axis : String ( pos )
2539
2546
} ) ;
2547
+
2548
+ Plotly . relayout ( gd , 'hovermode' , 'y unified' ) ;
2549
+ pos = 0 ;
2550
+ subplot = 'xy' ;
2551
+ Lib . clearThrottle ( ) ;
2552
+ Plotly . Fx . hover ( gd , { yval : pos } , subplot ) ;
2553
+ expect ( gd . _hoverdata . length ) . toBe ( 3 ) ;
2540
2554
} ) ;
2541
2555
} ) ;
2542
2556
0 commit comments