Skip to content

Commit fb00e1f

Browse files
committed
implement connectGaps false
1 parent d7a3fe1 commit fb00e1f

File tree

6 files changed

+24
-2
lines changed

6 files changed

+24
-2
lines changed

devtools/test_dashboard/test_gl3d.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,6 @@ plots['scatter3d-colorscale'] = require('@mocks/gl3d_scatter3d-colorscale.json')
3636
plots['autocolorscale'] = require('@mocks/gl3d_autocolorscale.json');
3737
plots['nan-holes'] = require('@mocks/gl3d_nan-holes.json');
3838
plots['tetrahedra'] = require('@mocks/gl3d_tet.json');
39+
plots['connectgaps'] = require('@mocks/gl3d_scatter3d-connectgaps.json');
3940

4041
plotButtons(plots, figDir);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"gl-error2d": "^1.0.0",
5555
"gl-error3d": "^1.0.0",
5656
"gl-line2d": "^1.2.1",
57-
"gl-line3d": "^1.0.1",
57+
"gl-line3d": "^1.1.0",
5858
"gl-mat4": "^1.1.2",
5959
"gl-mesh3d": "^1.0.7",
6060
"gl-plot2d": "^1.1.6",

src/traces/scatter3d/attributes.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,12 @@ module.exports = {
9595
y: makeProjectionAttr('y'),
9696
z: makeProjectionAttr('z')
9797
},
98+
connectgaps: {
99+
valType: 'boolean',
100+
role: 'style',
101+
dfl: false,
102+
description: 'Connects gaps in data'
103+
},
98104
line: {
99105
color: scatterLineAttrs.color,
100106
width: scatterLineAttrs.width,

src/traces/scatter3d/convert.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,8 @@ proto.update = function(data) {
303303
lineWidth: options.lineWidth || 1,
304304
dashes: dashPattern[0],
305305
dashScale: dashPattern[1],
306-
opacity: data.opacity
306+
opacity: data.opacity,
307+
connectGaps: data.connectgaps
307308
};
308309

309310
if(this.mode.indexOf('lines') !== -1) {

src/traces/scatter3d/defaults.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
3434

3535
coerce('text');
3636
coerce('mode');
37+
coerce('connectgaps');
3738

3839
if(subTypes.hasLines(traceOut)) {
3940
handleLineDefaults(traceIn, traceOut, defaultColor, coerce);
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"data": [{
3+
"type": "scatter3d",
4+
"mode": "lines",
5+
"x": [0, 1, 2, 3, 4, 5],
6+
"y": [0, 1, 2, 3, 4, 5],
7+
"z": [2, 1, null, null, 0, 3],
8+
"connectgaps": false
9+
}],
10+
"layout": {
11+
"title": "connect gaps test",
12+
}
13+
}

0 commit comments

Comments
 (0)