File tree Expand file tree Collapse file tree 1 file changed +7
-43
lines changed Expand file tree Collapse file tree 1 file changed +7
-43
lines changed Original file line number Diff line number Diff line change @@ -4602,37 +4602,13 @@ describe('hovermode: (x|y)unified', function() {
4602
4602
} ) ;
4603
4603
4604
4604
it ( 'should not display hover for display: none' , function ( done ) {
4605
- var x1 = [ ] ;
4606
- var y1 = [ ] ;
4607
- var x2 = [ ] ;
4608
- var y2 = [ ] ;
4609
- var i , t ;
4610
-
4611
- function r100 ( v ) {
4612
- return Math . round ( v * 100 ) ;
4613
- }
4614
-
4615
- for ( i = 0 ; i <= 1800 ; i ++ ) {
4616
- t = i / 180 * Math . PI ;
4617
- x1 . push ( r100 ( t / 5 ) ) ;
4618
- y1 . push ( r100 ( Math . sin ( t ) ) ) ;
4619
- }
4620
-
4621
- for ( i = 0 ; i <= 360 ; i ++ ) {
4622
- t = i / 180 * Math . PI ;
4623
- x2 . push ( r100 ( t ) ) ;
4624
- y2 . push ( r100 ( Math . sin ( t ) ) ) ;
4625
- }
4626
-
4627
4605
Plotly . newPlot ( gd , {
4628
4606
data : [ {
4629
- name : 'high' ,
4630
- x : x1 ,
4631
- y : y1
4607
+ name : 'A' ,
4608
+ y : [ 1 ]
4632
4609
} , {
4633
- name : 'low' ,
4634
- x : x2 ,
4635
- y : y2 ,
4610
+ name : 'B' ,
4611
+ y : [ 2 ] ,
4636
4612
hoverinfo : 'none'
4637
4613
} ] ,
4638
4614
layout : {
@@ -4649,21 +4625,9 @@ describe('hovermode: (x|y)unified', function() {
4649
4625
}
4650
4626
} )
4651
4627
. then ( function ( ) {
4652
- _hover ( gd , { xpx : 100 , ypx : 200 } ) ;
4653
- assertLabel ( { title : '157' , items : [
4654
- 'low : 100'
4655
- ] } ) ;
4656
- } )
4657
- . then ( function ( ) {
4658
- _hover ( gd , { xpx : 175 , ypx : 200 } ) ;
4659
- assertLabel ( { title : '274' , items : [
4660
- 'low : 39'
4661
- ] } ) ;
4662
- } )
4663
- . then ( function ( ) {
4664
- _hover ( gd , { xpx : 350 , ypx : 200 } ) ;
4665
- assertLabel ( { title : '550' , items : [
4666
- 'low : −71'
4628
+ _hover ( gd , { xpx : 200 , ypx : 200 } ) ;
4629
+ assertLabel ( { title : '0' , items : [
4630
+ 'A : 1'
4667
4631
] } ) ;
4668
4632
} )
4669
4633
. then ( done , done . fail ) ;
You can’t perform that action at this time.
0 commit comments