Skip to content

Commit 7cdd644

Browse files
committed
fix calculation of xdata/ydata for fancy scattergl
1 parent 0718103 commit 7cdd644

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/traces/scattergl/convert.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,11 @@ proto.updateFancy = function(options) {
349349
bounds = this.bounds;
350350

351351
// makeCalcdata runs d2c (data-to-coordinate) on every point
352-
var x = this.xData = xaxis.makeCalcdata(options, 'x');
353-
var y = this.yData = yaxis.makeCalcdata(options, 'y');
352+
var x = xaxis.makeCalcdata(options, 'x').slice();
353+
var y = yaxis.makeCalcdata(options, 'y').slice();
354+
355+
this.xData = x.slice();
356+
this.yData = y.slice();
354357

355358
// get error values
356359
var errorVals = ErrorBars.calcFromTrace(options, scene.fullLayout);
@@ -375,8 +378,8 @@ proto.updateFancy = function(options) {
375378
var i, j, xx, yy, ex0, ex1, ey0, ey1;
376379

377380
for(i = 0; i < len; ++i) {
378-
xx = getX(x[i]);
379-
yy = getY(y[i]);
381+
this.xData[i] = xx = getX(x[i]);
382+
this.yData[i] = yy = getY(y[i]);
380383

381384
if(isNaN(xx) || isNaN(yy)) continue;
382385

0 commit comments

Comments
 (0)