Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f219206

Browse files
committed
Fix raw data init
1 parent 530efee commit f219206

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/traces/scattergl/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,15 @@ ScatterRegl.calc = function calc(container, trace) {
8080
if(xaxis.type === 'log') {
8181
var rawx = Array(x.length);
8282
for(i = 0, l = x.length; i < l; i++) {
83-
rawx[i] = x[i]
83+
rawx[i] = x[i];
8484
x[i] = xaxis.d2l(x[i]);
8585
}
8686
}
8787
else {
8888
rawx = x;
89+
for(i = 0, l = x.length; i < l; i++) {
90+
x[i] = parseFloat(x[i]);
91+
}
8992
}
9093
if(yaxis.type === 'log') {
9194
var rawy = Array(y.length);
@@ -96,6 +99,9 @@ ScatterRegl.calc = function calc(container, trace) {
9699
}
97100
else {
98101
rawy = y;
102+
for(i = 0, l = y.length; i < l; i++) {
103+
y[i] = parseFloat(y[i]);
104+
}
99105
}
100106

101107
// we need hi-precision for scatter2d

0 commit comments

Comments
 (0)