Skip to content

Commit a9eca09

Browse files
committed
accept typed array as inner arrays in multicategory autotype
1 parent ad97171 commit a9eca09

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/plots/cartesian/axis_autotype.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,5 @@ function category(a) {
8989
// trace modules that should never auto-type to multicategory
9090
// should be declared with 'noMultiCategory'
9191
function multiCategory(a) {
92-
return Array.isArray(a[0]) && Array.isArray(a[1]);
92+
return Lib.isArrayOrTypedArray(a[0]) && Lib.isArrayOrTypedArray(a[1]);
9393
}

test/jasmine/tests/axes_test.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,18 @@ describe('Test axes', function() {
293293
});
294294
checkTypes('multicategory', 'multicategory');
295295

296+
supplyWithTrace({
297+
x: [
298+
new Float32Array([2018, 2018, 2017, 2017]),
299+
[2018, 2018, 2017, 2017]
300+
],
301+
y: [
302+
[2018, 2018, 2017, 2017],
303+
new Float64Array([2018, 2018, 2017, 2017])
304+
]
305+
});
306+
checkTypes('multicategory', 'multicategory');
307+
296308
supplyWithTrace({
297309
x: [
298310
[2018, 2018, 2017, 2017]

0 commit comments

Comments
 (0)