@@ -4834,7 +4834,7 @@ describe('hovermode: (x|y)unified', function() {
4834
4834
it ( 'should format differing position using *xother* `hovertemplate` and in respect to `xhoverformat`' , function ( done ) {
4835
4835
Plotly . newPlot ( gd , [ {
4836
4836
type : 'bar' ,
4837
- hovertemplate : '%{y}%{_xother:.2f}' ,
4837
+ hovertemplate : 'y(_x): %{y}%{_xother:.2f}' ,
4838
4838
x : [ 0 , 1.001 ] ,
4839
4839
y : [ 2 , 1 ]
4840
4840
} , {
@@ -4846,12 +4846,12 @@ describe('hovermode: (x|y)unified', function() {
4846
4846
x : [ 0 , 1.251 ] ,
4847
4847
y : [ 2 , 3 ]
4848
4848
} , {
4849
- hovertemplate : '(x )y:%{xother_}%{y}' ,
4849
+ hovertemplate : '(x_ )y:%{xother_}%{y}' ,
4850
4850
xhoverformat : '.2f' ,
4851
4851
x : [ 0 , 1.351 ] ,
4852
4852
y : [ 3 , 4 ]
4853
4853
} , {
4854
- hovertemplate : '(x )y:%{_xother_}%{y}' ,
4854
+ hovertemplate : '(_x_ )y:%{_xother_}%{y}' ,
4855
4855
xhoverformat : '.3f' ,
4856
4856
x : [ 0 , 1.451 ] ,
4857
4857
y : [ 4 , 5 ]
@@ -4871,31 +4871,31 @@ describe('hovermode: (x|y)unified', function() {
4871
4871
. then ( function ( ) {
4872
4872
_hover ( gd , { xpx : 100 , ypx : 200 } ) ;
4873
4873
assertLabel ( { title : '0.000' , items : [
4874
- 'trace 0 : 2 (0.00)' ,
4874
+ 'trace 0 : y(_x): 2 (0.00)' ,
4875
4875
'trace 1 : (0, 1)' ,
4876
4876
'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' ,
4879
4879
] } ) ;
4880
4880
} )
4881
4881
. then ( function ( ) {
4882
4882
_hover ( gd , { xpx : 250 , ypx : 200 } ) ;
4883
4883
assertLabel ( { title : '0.749' , items : [
4884
- 'trace 0 : 1 (1.00)' ,
4884
+ 'trace 0 : y(_x): 1 (1.00)' ,
4885
4885
'trace 1 : 2' ,
4886
4886
'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' ,
4889
4889
] } ) ;
4890
4890
} )
4891
4891
. then ( function ( ) {
4892
4892
_hover ( gd , { xpx : 350 , ypx : 200 } ) ;
4893
4893
assertLabel ( { title : '1.35' , items : [
4894
- 'trace 0 : 1 (1.00)' ,
4894
+ 'trace 0 : y(_x): 1 (1.00)' ,
4895
4895
'trace 1 : (0.749, 2)' ,
4896
4896
'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' ,
4899
4899
] } ) ;
4900
4900
} )
4901
4901
. then ( done , done . fail ) ;
0 commit comments