File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ function transformOne(trace, state) {
137137 var groups = trace . transforms [ state . transformIndex ] . groups ;
138138
139139 if ( ! ( Array . isArray ( groups ) ) || groups . length === 0 ) {
140- return trace ;
140+ return [ trace ] ;
141141 }
142142
143143 var groupNames = Lib . filterUnique ( groups ) ,
@@ -177,12 +177,6 @@ function transformOne(trace, state) {
177177 for ( j = 0 ; j < arrayAttrs . length ; j ++ ) {
178178 Lib . nestedProperty ( newTrace , arrayAttrs [ j ] ) . set ( [ ] ) ;
179179 }
180-
181- Plots . clearExpandedTraceDefaultColors ( newTrace ) ;
182-
183- // there's no need to coerce styleLookup[groupName] here
184- // as another round of supplyDefaults is done on the transformed traces
185- newTrace = Lib . extendDeepNoArrays ( newTrace , styleLookup [ groupName ] || { } ) ;
186180 }
187181
188182
@@ -201,5 +195,16 @@ function transformOne(trace, state) {
201195 }
202196 }
203197
198+ for ( i = 0 ; i < groupNames . length ; i ++ ) {
199+ groupName = groupNames [ i ] ;
200+ newTrace = newData [ i ] ;
201+
202+ Plots . clearExpandedTraceDefaultColors ( newTrace ) ;
203+
204+ // there's no need to coerce styleLookup[groupName] here
205+ // as another round of supplyDefaults is done on the transformed traces
206+ newTrace = Lib . extendDeepNoArrays ( newTrace , styleLookup [ groupName ] || { } ) ;
207+ }
208+
204209 return newData ;
205210}
You can’t perform that action at this time.
0 commit comments