@@ -612,7 +612,7 @@ plots.supplyDataDefaults = function(dataIn, dataOut, layout, fullLayout) {
612
612
613
613
for ( var i = 0 ; i < dataIn . length ; i ++ ) {
614
614
var trace = dataIn [ i ] ,
615
- fullTrace = plots . supplyTraceDefaults ( trace , cnt , fullLayout ) ;
615
+ fullTrace = plots . supplyTraceDefaults ( trace , cnt , fullLayout , i ) ;
616
616
617
617
fullTrace . index = i ;
618
618
fullTrace . _input = trace ;
@@ -623,7 +623,7 @@ plots.supplyDataDefaults = function(dataIn, dataOut, layout, fullLayout) {
623
623
624
624
for ( var j = 0 ; j < expandedTraces . length ; j ++ ) {
625
625
var expandedTrace = expandedTraces [ j ] ,
626
- fullExpandedTrace = plots . supplyTraceDefaults ( expandedTrace , cnt , fullLayout ) ;
626
+ fullExpandedTrace = plots . supplyTraceDefaults ( expandedTrace , cnt , fullLayout , i ) ;
627
627
628
628
// mutate uid here using parent uid and expanded index
629
629
// to promote consistency between update calls
@@ -722,9 +722,9 @@ plots.supplyFrameDefaults = function(frameIn) {
722
722
return frameOut ;
723
723
} ;
724
724
725
- plots . supplyTraceDefaults = function ( traceIn , traceIndex , layout ) {
725
+ plots . supplyTraceDefaults = function ( traceIn , traceOutIndex , layout , traceInIndex ) {
726
726
var traceOut = { } ,
727
- defaultColor = Color . defaults [ traceIndex % Color . defaults . length ] ;
727
+ defaultColor = Color . defaults [ traceOutIndex % Color . defaults . length ] ;
728
728
729
729
function coerce ( attr , dflt ) {
730
730
return Lib . coerce ( traceIn , traceOut , plots . attributes , attr , dflt ) ;
@@ -741,7 +741,7 @@ plots.supplyTraceDefaults = function(traceIn, traceIndex, layout) {
741
741
742
742
coerce ( 'type' ) ;
743
743
coerce ( 'uid' ) ;
744
- coerce ( 'name' , 'trace ' + traceIndex ) ;
744
+ coerce ( 'name' , 'trace ' + traceInIndex ) ;
745
745
746
746
// coerce subplot attributes of all registered subplot types
747
747
var subplotTypes = Object . keys ( subplotsRegistry ) ;
0 commit comments