Skip to content

Commit 4bab8de

Browse files
committed
handle typed arrays in parcats categoryarray
1 parent 6e3f987 commit 4bab8de

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/traces/parcats/defaults.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ var handleArrayContainerDefaults = require('../../plots/array_container_defaults
88

99
var attributes = require('./attributes');
1010
var mergeLength = require('../parcoords/merge_length');
11+
var isTypedArraySpec = require('../../lib/array').isTypedArraySpec;
1112

1213
function handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce) {
1314
coerce('line.shape');
@@ -44,7 +45,8 @@ function dimensionDefaults(dimensionIn, dimensionOut) {
4445

4546
// Category level
4647
var arrayIn = dimensionIn.categoryarray;
47-
var isValidArray = (Array.isArray(arrayIn) && arrayIn.length > 0);
48+
var isValidArray = (Lib.isArrayOrTypedArray(arrayIn) && arrayIn.length > 0) ||
49+
isTypedArraySpec(arrayIn);
4850

4951
var orderDefault;
5052
if(isValidArray) orderDefault = 'array';

0 commit comments

Comments
 (0)