File tree 2 files changed +14
-1
lines changed
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -128,7 +128,8 @@ module.exports = function plot(gd, calcData) {
128
128
var size = fullLayout . _size ;
129
129
130
130
// stash initial view
131
- for ( var i = 0 ; i < calcData . length ; i ++ ) {
131
+ for ( var i = 0 ; i < gd . _fullData . length ; i ++ ) {
132
+ if ( gd . _fullData [ i ] . type !== cn . sankey ) continue ;
132
133
if ( ! gd . _fullData [ i ] . _viewInitial ) {
133
134
var node = gd . _fullData [ i ] . node ;
134
135
gd . _fullData [ i ] . _viewInitial = {
Original file line number Diff line number Diff line change @@ -610,6 +610,18 @@ describe('sankey tests', function() {
610
610
. then ( done ) ;
611
611
} ) ;
612
612
613
+ it ( 'works as a subplot in the presence of other trace types' , function ( done ) {
614
+ var mockCopy = Lib . extendDeep ( { } , require ( '@mocks/sankey_subplots_circular' ) ) ;
615
+
616
+ mockCopy . data [ 0 ] = {
617
+ y : [ 5 , 1 , 4 , 3 , 2 ]
618
+ } ;
619
+
620
+ Plotly . plot ( gd , mockCopy )
621
+ . catch ( failTest )
622
+ . then ( done ) ;
623
+ } ) ;
624
+
613
625
[ '0' , '1' ] . forEach ( function ( finalUIRevision ) {
614
626
it ( 'on Plotly.react, it preserves the groups depending on layout.uirevision' , function ( done ) {
615
627
var uirevisions = [ '0' , finalUIRevision ] ;
You can’t perform that action at this time.
0 commit comments