@@ -618,7 +618,7 @@ plots.supplyDataDefaults = function(dataIn, dataOut, layout, fullLayout) {
618618
619619 for ( var i = 0 ; i < dataIn . length ; i ++ ) {
620620 var trace = dataIn [ i ] ,
621- fullTrace = plots . supplyTraceDefaults ( trace , cnt , fullLayout ) ;
621+ fullTrace = plots . supplyTraceDefaults ( trace , cnt , fullLayout , i ) ;
622622
623623 fullTrace . index = i ;
624624 fullTrace . _input = trace ;
@@ -629,7 +629,7 @@ plots.supplyDataDefaults = function(dataIn, dataOut, layout, fullLayout) {
629629
630630 for ( var j = 0 ; j < expandedTraces . length ; j ++ ) {
631631 var expandedTrace = expandedTraces [ j ] ,
632- fullExpandedTrace = plots . supplyTraceDefaults ( expandedTrace , cnt , fullLayout ) ;
632+ fullExpandedTrace = plots . supplyTraceDefaults ( expandedTrace , cnt , fullLayout , i ) ;
633633
634634 // mutate uid here using parent uid and expanded index
635635 // to promote consistency between update calls
@@ -733,9 +733,9 @@ plots.supplyFrameDefaults = function(frameIn) {
733733 return frameOut ;
734734} ;
735735
736- plots . supplyTraceDefaults = function ( traceIn , traceIndex , layout ) {
736+ plots . supplyTraceDefaults = function ( traceIn , traceOutIndex , layout , traceInIndex ) {
737737 var traceOut = { } ,
738- defaultColor = Color . defaults [ traceIndex % Color . defaults . length ] ;
738+ defaultColor = Color . defaults [ traceOutIndex % Color . defaults . length ] ;
739739
740740 function coerce ( attr , dflt ) {
741741 return Lib . coerce ( traceIn , traceOut , plots . attributes , attr , dflt ) ;
@@ -752,7 +752,7 @@ plots.supplyTraceDefaults = function(traceIn, traceIndex, layout) {
752752
753753 coerce ( 'type' ) ;
754754 coerce ( 'uid' ) ;
755- coerce ( 'name' , 'trace ' + traceIndex ) ;
755+ coerce ( 'name' , 'trace ' + traceInIndex ) ;
756756
757757 // coerce subplot attributes of all registered subplot types
758758 var subplotTypes = Object . keys ( subplotsRegistry ) ;
0 commit comments