@@ -817,9 +817,9 @@ describe('sankey tests', function() {
817
817
var gd = createGraphDiv ( ) ;
818
818
var mockCopy = Lib . extendDeep ( { } , mock ) ;
819
819
mockCopy . data [ 0 ] . node . customdata = [ ] ;
820
- mockCopy . data [ 0 ] . node . customdata [ 4 ] = 'nodeCustomdata' ;
820
+ mockCopy . data [ 0 ] . node . customdata [ 4 ] = [ 'nodeCustomdata0' , 'nodeCustomdata1' ] ;
821
821
mockCopy . data [ 0 ] . link . customdata = [ ] ;
822
- mockCopy . data [ 0 ] . link . customdata [ 61 ] = 'linkCustomdata' ;
822
+ mockCopy . data [ 0 ] . link . customdata [ 61 ] = [ 'linkCustomdata0' , 'linkCustomdata1' ] ;
823
823
824
824
Plotly . plot ( gd , mockCopy ) . then ( function ( ) {
825
825
_hover ( 404 , 302 ) ;
@@ -840,23 +840,23 @@ describe('sankey tests', function() {
840
840
// Test (node|link).hovertemplate
841
841
. then ( function ( ) {
842
842
return Plotly . restyle ( gd , {
843
- 'node.hovertemplate' : 'hovertemplate<br>%{value}<br>%{value:0.2f}<br>%{customdata}<extra>%{fullData.name}</extra>' ,
844
- 'link.hovertemplate' : 'hovertemplate<br>source: %{source.label}<br>target: %{target.label}<br>size: %{value:0.0f}TWh<br>%{customdata}<extra>%{fullData.name}</extra>'
843
+ 'node.hovertemplate' : 'hovertemplate<br>%{value}<br>%{value:0.2f}<br>%{customdata[0]}/%{customdata[1] }<extra>%{fullData.name}</extra>' ,
844
+ 'link.hovertemplate' : 'hovertemplate<br>source: %{source.label}<br>target: %{target.label}<br>size: %{value:0.0f}TWh<br>%{customdata[1] }<extra>%{fullData.name}</extra>'
845
845
} ) ;
846
846
} )
847
847
. then ( function ( ) {
848
848
_hover ( 404 , 302 ) ;
849
849
850
850
assertLabel (
851
- [ 'hovertemplate' , '447TWh' , '447.48' , 'nodeCustomdata ' , 'trace 0' ] ,
851
+ [ 'hovertemplate' , '447TWh' , '447.48' , 'nodeCustomdata0/nodeCustomdata1 ' , 'trace 0' ] ,
852
852
[ 'rgb(148, 103, 189)' , 'rgb(255, 255, 255)' , 13 , 'Arial' , 'rgb(255, 255, 255)' ]
853
853
) ;
854
854
} )
855
855
. then ( function ( ) {
856
856
_hover ( 450 , 300 ) ;
857
857
858
858
assertLabel (
859
- [ 'hovertemplate' , 'source: Solid' , 'target: Industry' , 'size: 46TWh' , 'linkCustomdata ' , 'trace 0' ] ,
859
+ [ 'hovertemplate' , 'source: Solid' , 'target: Industry' , 'size: 46TWh' , 'linkCustomdata1 ' , 'trace 0' ] ,
860
860
[ 'rgb(0, 0, 96)' , 'rgb(255, 255, 255)' , 13 , 'Arial' , 'rgb(255, 255, 255)' ]
861
861
) ;
862
862
} )
0 commit comments