Skip to content

Commit 662294e

Browse files
committed
handle typed arrays in categoryarray
1 parent fe9b404 commit 662294e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/plots/cartesian/category_order_defaults.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
'use strict';
22

3+
var isTypedArraySpec = require('../../lib/array').isTypedArraySpec;
4+
35
function findCategories(ax, opts) {
46
var dataAttr = opts.dataAttr || ax._id.charAt(0);
57
var lookup = {};
@@ -49,7 +51,8 @@ module.exports = function handleCategoryOrderDefaults(containerIn, containerOut,
4951
if(containerOut.type !== 'category') return;
5052

5153
var arrayIn = containerIn.categoryarray;
52-
var isValidArray = (Array.isArray(arrayIn) && arrayIn.length > 0);
54+
var isValidArray = (Array.isArray(arrayIn) && arrayIn.length > 0) ||
55+
isTypedArraySpec(arrayIn);
5356

5457
// override default 'categoryorder' value when non-empty array is supplied
5558
var orderDefault;

0 commit comments

Comments
 (0)