Skip to content

Commit e691a4f

Browse files
committed
handle typed arrays for smith charts
1 parent ae04cad commit e691a4f

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/plots/smith/layout_defaults.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ function handleDefaults(contIn, contOut, coerce, opts) {
7171
coerceAxis('tickvals', imagTickvalsDflt);
7272
}
7373

74+
if(Lib.isTypedArray(axOut.tickvals)) axOut.tickvals = Array.from(axOut.tickvals);
75+
7476
var dfltColor;
7577
var dfltFontColor;
7678
var dfltFontSize;

src/traces/scattersmith/defaults.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@ function handleRealImagDefaults(traceIn, traceOut, layout, coerce) {
7575
len = Math.min(real.length, imag.length);
7676
}
7777

78+
if(Lib.isTypedArray(real)) {
79+
traceOut.real = real = Array.from(real);
80+
}
81+
if(Lib.isTypedArray(imag)) {
82+
traceOut.imag = imag = Array.from(imag);
83+
}
84+
7885
traceOut._length = len;
7986
return len;
8087
}

0 commit comments

Comments
 (0)