@@ -618,7 +618,7 @@ plots.supplyDataDefaults = function(dataIn, dataOut, layout, fullLayout) {
618
618
619
619
for ( var i = 0 ; i < dataIn . length ; i ++ ) {
620
620
var trace = dataIn [ i ] ,
621
- fullTrace = plots . supplyTraceDefaults ( trace , cnt , fullLayout ) ;
621
+ fullTrace = plots . supplyTraceDefaults ( trace , cnt , fullLayout , i ) ;
622
622
623
623
fullTrace . index = i ;
624
624
fullTrace . _input = trace ;
@@ -629,7 +629,7 @@ plots.supplyDataDefaults = function(dataIn, dataOut, layout, fullLayout) {
629
629
630
630
for ( var j = 0 ; j < expandedTraces . length ; j ++ ) {
631
631
var expandedTrace = expandedTraces [ j ] ,
632
- fullExpandedTrace = plots . supplyTraceDefaults ( expandedTrace , cnt , fullLayout ) ;
632
+ fullExpandedTrace = plots . supplyTraceDefaults ( expandedTrace , cnt , fullLayout , i ) ;
633
633
634
634
// mutate uid here using parent uid and expanded index
635
635
// to promote consistency between update calls
@@ -733,9 +733,9 @@ plots.supplyFrameDefaults = function(frameIn) {
733
733
return frameOut ;
734
734
} ;
735
735
736
- plots . supplyTraceDefaults = function ( traceIn , traceIndex , layout ) {
736
+ plots . supplyTraceDefaults = function ( traceIn , traceOutIndex , layout , traceInIndex ) {
737
737
var traceOut = { } ,
738
- defaultColor = Color . defaults [ traceIndex % Color . defaults . length ] ;
738
+ defaultColor = Color . defaults [ traceOutIndex % Color . defaults . length ] ;
739
739
740
740
function coerce ( attr , dflt ) {
741
741
return Lib . coerce ( traceIn , traceOut , plots . attributes , attr , dflt ) ;
@@ -752,7 +752,7 @@ plots.supplyTraceDefaults = function(traceIn, traceIndex, layout) {
752
752
753
753
coerce ( 'type' ) ;
754
754
coerce ( 'uid' ) ;
755
- coerce ( 'name' , 'trace ' + traceIndex ) ;
755
+ coerce ( 'name' , 'trace ' + traceInIndex ) ;
756
756
757
757
// coerce subplot attributes of all registered subplot types
758
758
var subplotTypes = Object . keys ( subplotsRegistry ) ;
0 commit comments