@@ -4834,7 +4834,7 @@ describe('hovermode: (x|y)unified', function() {
48344834 it ( 'should format differing position using *xother* `hovertemplate` and in respect to `xhoverformat`' , function ( done ) {
48354835 Plotly . newPlot ( gd , [ {
48364836 type : 'bar' ,
4837- hovertemplate : '%{y}%{_xother:.2f}' ,
4837+ hovertemplate : 'y(_x): %{y}%{_xother:.2f}' ,
48384838 x : [ 0 , 1.001 ] ,
48394839 y : [ 2 , 1 ]
48404840 } , {
@@ -4846,12 +4846,12 @@ describe('hovermode: (x|y)unified', function() {
48464846 x : [ 0 , 1.251 ] ,
48474847 y : [ 2 , 3 ]
48484848 } , {
4849- hovertemplate : '(x )y:%{xother_}%{y}' ,
4849+ hovertemplate : '(x_ )y:%{xother_}%{y}' ,
48504850 xhoverformat : '.2f' ,
48514851 x : [ 0 , 1.351 ] ,
48524852 y : [ 3 , 4 ]
48534853 } , {
4854- hovertemplate : '(x )y:%{_xother_}%{y}' ,
4854+ hovertemplate : '(_x_ )y:%{_xother_}%{y}' ,
48554855 xhoverformat : '.3f' ,
48564856 x : [ 0 , 1.451 ] ,
48574857 y : [ 4 , 5 ]
@@ -4871,31 +4871,31 @@ describe('hovermode: (x|y)unified', function() {
48714871 . then ( function ( ) {
48724872 _hover ( gd , { xpx : 100 , ypx : 200 } ) ;
48734873 assertLabel ( { title : '0.000' , items : [
4874- 'trace 0 : 2 (0.00)' ,
4874+ 'trace 0 : y(_x): 2 (0.00)' ,
48754875 'trace 1 : (0, 1)' ,
48764876 'trace 2 : (x)y:(0.0)2' ,
4877- 'trace 3 : (x )y:(0.00) 3' ,
4878- 'trace 4 : (x )y:4' ,
4877+ 'trace 3 : (x_ )y:(0.00) 3' ,
4878+ 'trace 4 : (_x_ )y:4' ,
48794879 ] } ) ;
48804880 } )
48814881 . then ( function ( ) {
48824882 _hover ( gd , { xpx : 250 , ypx : 200 } ) ;
48834883 assertLabel ( { title : '0.749' , items : [
4884- 'trace 0 : 1 (1.00)' ,
4884+ 'trace 0 : y(_x): 1 (1.00)' ,
48854885 'trace 1 : 2' ,
48864886 'trace 2 : (x)y:(1.3)3' ,
4887- 'trace 3 : (x )y:(1.35) 4' ,
4888- 'trace 4 : (x )y: (1.451) 5' ,
4887+ 'trace 3 : (x_ )y:(1.35) 4' ,
4888+ 'trace 4 : (_x_ )y: (1.451) 5' ,
48894889 ] } ) ;
48904890 } )
48914891 . then ( function ( ) {
48924892 _hover ( gd , { xpx : 350 , ypx : 200 } ) ;
48934893 assertLabel ( { title : '1.35' , items : [
4894- 'trace 0 : 1 (1.00)' ,
4894+ 'trace 0 : y(_x): 1 (1.00)' ,
48954895 'trace 1 : (0.749, 2)' ,
48964896 'trace 2 : (x)y:(1.3)3' ,
4897- 'trace 3 : (x )y:4' ,
4898- 'trace 4 : (x )y: (1.451) 5' ,
4897+ 'trace 3 : (x_ )y:4' ,
4898+ 'trace 4 : (_x_ )y: (1.451) 5' ,
48994899 ] } ) ;
49004900 } )
49014901 . then ( done , done . fail ) ;
0 commit comments