@@ -3699,6 +3699,8 @@ describe('hovermode: (x|y)unified', function() {
3699
3699
var hoverLayer = d3 . select ( 'g.hoverlayer' ) ;
3700
3700
var hover = hoverLayer . select ( 'g.legend' ) ;
3701
3701
var traces = hover . selectAll ( 'g.traces' ) ;
3702
+ expect ( traces . size ( ) ) . toBe ( exp . length ) ;
3703
+
3702
3704
traces . each ( function ( d , i ) {
3703
3705
var pts = d3 . select ( this ) . selectAll ( 'g.legendpoints path' ) ;
3704
3706
pts . each ( function ( ) {
@@ -3923,6 +3925,31 @@ describe('hovermode: (x|y)unified', function() {
3923
3925
. then ( done ) ;
3924
3926
} ) ;
3925
3927
3928
+ it ( 'should style waterfall symbols correctly' , function ( done ) {
3929
+ var mock = require ( '@mocks/waterfall_custom.json' ) ;
3930
+ var mockCopy = Lib . extendDeep ( { } , mock ) ;
3931
+ mockCopy . layout . hovermode = 'x unified' ;
3932
+ Plotly . newPlot ( gd , mockCopy )
3933
+ . then ( function ( gd ) {
3934
+ _hover ( gd , { xval : 4 } ) ;
3935
+ assertSymbol ( [
3936
+ [ 'rgb(255, 65, 54)' , '0px' , '' ]
3937
+ ] ) ;
3938
+ return Plotly . restyle ( gd , {
3939
+ 'decreasing.marker.line.width' : 5 ,
3940
+ 'decreasing.marker.line.color' : 'violet'
3941
+ } ) ;
3942
+ } )
3943
+ . then ( function ( gd ) {
3944
+ _hover ( gd , { xval : 4 } ) ;
3945
+ assertSymbol ( [
3946
+ [ 'rgb(255, 65, 54)' , '5px' , 'rgb(238, 130, 238)' ]
3947
+ ] ) ;
3948
+ } )
3949
+ . catch ( failTest )
3950
+ . then ( done ) ;
3951
+ } ) ;
3952
+
3926
3953
it ( 'label should have color of paper_bgcolor' , function ( done ) {
3927
3954
var mockCopy = Lib . extendDeep ( { } , mock ) ;
3928
3955
var bgcolor = 'rgb(15, 200, 85)' ;
0 commit comments