@@ -230,6 +230,11 @@ function setOffsetAndWidth(gd, pa, sieve) {
230
230
// if offset is an array, then clone it into t.poffset.
231
231
newPoffset = offset . slice ( 0 , calcTrace . length ) ;
232
232
233
+ // guard against non-numeric items
234
+ for ( j = 0 ; j < newPoffset . length ; j ++ ) {
235
+ if ( ! isNumeric ( newPoffset [ j ] ) ) newPoffset [ j ] = initialPoffset ;
236
+ }
237
+
233
238
// if the length of the array is too short,
234
239
// then extend it with the initial value of t.poffset
235
240
for ( j = newPoffset . length ; j < calcTrace . length ; j ++ ) {
@@ -248,6 +253,11 @@ function setOffsetAndWidth(gd, pa, sieve) {
248
253
// if width is an array, then clone it into t.barwidth.
249
254
var newBarwidth = width . slice ( 0 , calcTrace . length ) ;
250
255
256
+ // guard against non-numeric items
257
+ for ( j = 0 ; j < newBarwidth . length ; j ++ ) {
258
+ if ( ! isNumeric ( newBarwidth [ j ] ) ) newBarwidth [ j ] = initialBarwidth ;
259
+ }
260
+
251
261
// if the length of the array is too short,
252
262
// then extend it with the initial value of t.barwidth
253
263
for ( j = newBarwidth . length ; j < calcTrace . length ; j ++ ) {
@@ -348,6 +358,11 @@ function setOffsetAndWidthInGroupMode(gd, pa, sieve) {
348
358
// if width is an array, then clone it into t.barwidth.
349
359
var newBarwidth = width . slice ( 0 , calcTrace . length ) ;
350
360
361
+ // guard against non-numeric items
362
+ for ( j = 0 ; j < newBarwidth . length ; j ++ ) {
363
+ if ( ! isNumeric ( newBarwidth [ j ] ) ) newBarwidth [ j ] = initialBarwidth ;
364
+ }
365
+
351
366
// if the length of the array is too short,
352
367
// then extend it with the initial value of t.barwidth
353
368
for ( j = newBarwidth . length ; j < calcTrace . length ; j ++ ) {
0 commit comments