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) {
137
137
var groups = trace . transforms [ state . transformIndex ] . groups ;
138
138
139
139
if ( ! ( Array . isArray ( groups ) ) || groups . length === 0 ) {
140
- return trace ;
140
+ return [ trace ] ;
141
141
}
142
142
143
143
var groupNames = Lib . filterUnique ( groups ) ,
@@ -177,12 +177,6 @@ function transformOne(trace, state) {
177
177
for ( j = 0 ; j < arrayAttrs . length ; j ++ ) {
178
178
Lib . nestedProperty ( newTrace , arrayAttrs [ j ] ) . set ( [ ] ) ;
179
179
}
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 ] || { } ) ;
186
180
}
187
181
188
182
@@ -201,5 +195,16 @@ function transformOne(trace, state) {
201
195
}
202
196
}
203
197
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
+
204
209
return newData ;
205
210
}
You can’t perform that action at this time.
0 commit comments