File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7436,6 +7436,38 @@ describe('hovermode: (x|y)unified', function () {
74367436 } )
74377437 . then ( done , done . fail ) ;
74387438 } ) ;
7439+
7440+ fit ( 'hover label should only show values of hovered category' , function ( done ) {
7441+ Plotly . newPlot ( gd , {
7442+ data : [
7443+ { name : 'bar' ,
7444+ x : [ 'A' , 'B' ] ,
7445+ y : [ 1 , 2 ] ,
7446+ type : 'bar'
7447+ } ,
7448+ {
7449+ name : 'scatter' ,
7450+ x : [ 'A' , 'B' ] ,
7451+ y : [ 10 , null ] ,
7452+ type : 'scatter'
7453+ }
7454+ ] ,
7455+ layout : {
7456+ width : 400 ,
7457+ hovermode : 'x unified' ,
7458+ hoverdistance : 110
7459+ }
7460+ } )
7461+ . then ( function ( ) {
7462+ _hover ( gd , { xval : 1.1 } ) ;
7463+ assertLabel ( { title : 'B' , items : [ 'bar : 2' ] } ) ;
7464+ } )
7465+ . then ( function ( ) {
7466+ _hover ( gd , { xval : 0 } ) ;
7467+ assertLabel ( { title : 'A' , items : [ 'bar : 1' , 'scatter : 10' ] } ) ;
7468+ } )
7469+ . then ( done , done . fail ) ;
7470+ } ) ;
74397471} ) ;
74407472
74417473describe ( 'hover on traces with (x|y)hoverformat' , function ( ) {
You can’t perform that action at this time.
0 commit comments