diff --git a/src/traces/scatter3d/convert.js b/src/traces/scatter3d/convert.js index 1a7fdc7968a..c039b85836a 100644 --- a/src/traces/scatter3d/convert.js +++ b/src/traces/scatter3d/convert.js @@ -116,17 +116,17 @@ function constructDelaunay(points, color, axis) { function calculateErrorParams(errors) { var capSize = [0.0, 0.0, 0.0], color = [[0, 0, 0], [0, 0, 0], [0, 0, 0]], - lineWidth = [0.0, 0.0, 0.0]; + lineWidth = [1.0, 1.0, 1.0]; for(var i = 0; i < 3; i++) { var e = errors[i]; - if(e && e.copy_zstyle !== false) e = errors[2]; - if(!e) continue; + if(e && e.copy_zstyle !== false && errors[2].visible !== false) e = errors[2]; + if(!e || !e.visible) continue; capSize[i] = e.width / 2; // ballpark rescaling color[i] = str2RgbaArray(e.color); - lineWidth = e.thickness; + lineWidth[i] = e.thickness; } diff --git a/test/image/baselines/gl3d_errorbars_xy.png b/test/image/baselines/gl3d_errorbars_xy.png new file mode 100644 index 00000000000..fbc681e36dd Binary files /dev/null and b/test/image/baselines/gl3d_errorbars_xy.png differ diff --git a/test/image/mocks/gl3d_errorbars_xy.json b/test/image/mocks/gl3d_errorbars_xy.json new file mode 100644 index 00000000000..1330a25ed92 --- /dev/null +++ b/test/image/mocks/gl3d_errorbars_xy.json @@ -0,0 +1,17 @@ +{ + "data": [{ + "type": "scatter3d", + "mode": "markers", + "x": [5, 10], + "y": [5, 10], + "z": [5, 10], + "error_x": { + "type": "sqrt", + "color": "red" + }, + "error_y": { + "type": "sqrt" + } + }], + "layout": {} +} diff --git a/test/image/mocks/gl3d_errorbars_zx.json b/test/image/mocks/gl3d_errorbars_zx.json index 54b592faa9e..24867638d66 100644 --- a/test/image/mocks/gl3d_errorbars_zx.json +++ b/test/image/mocks/gl3d_errorbars_zx.json @@ -35,7 +35,8 @@ "error_x": { "type": "constant", "value": 0.1, - "color": "black" + "color": "black", + "thickness": 10 }, "marker": { "symbol": "square"