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

Skip to content

Commit 64b6121

Browse files
committed
Fix errors display
1 parent 7bedad7 commit 64b6121

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/traces/scattergl/convert.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,16 +226,16 @@ function convertMarkerSelection(trace, target) {
226226
}
227227

228228
function convertErrorBarStyle(trace, target) {
229+
if(target.copy_ystyle) {
230+
target = trace.error_y;
231+
}
232+
229233
var optsOut = {
230234
capSize: target.width * 2,
231235
lineWidth: target.thickness,
232236
color: target.color
233237
};
234238

235-
if(target.copy_ystyle) {
236-
optsOut = trace.error_y;
237-
}
238-
239239
return optsOut;
240240
}
241241

src/traces/scattergl/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ function calc(gd, trace) {
4747
var x = xa.makeCalcdata(trace, 'x');
4848
var y = ya.makeCalcdata(trace, 'y');
4949

50+
// FIXME: without that undefined x is not detected in convertErrorBarPositions
51+
if(!trace.x) trace.x = x;
52+
if(!trace.y) trace.y = y;
53+
5054
// we need hi-precision for scatter2d,
5155
// regl-scatter2d uses NaNs for bad/missing values
5256
var positions = new Array(count2);

0 commit comments

Comments
 (0)