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

Skip to content

Commit f382f46

Browse files
committed
Merge pull request plotly#361 from mikolalysenko/connect-gaps
Implement connectGaps
2 parents 048f981 + 1f2a689 commit f382f46

File tree

7 files changed

+36
-2
lines changed

7 files changed

+36
-2
lines changed

devtools/test_dashboard/test_gl3d.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ plots['marker-arrays'] = require('@mocks/gl3d_marker-arrays.json');
3535
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');
38+
plots['scatter3d-connectgaps'] = require('@mocks/gl3d_scatter3d-connectgaps.json');
3839
plots['tet'] = require('@mocks/gl3d_tet.json');
3940
plots['surface_intensity'] = require('@mocks/gl3d_surface_intensity.json');
4041

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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ module.exports = {
9595
y: makeProjectionAttr('y'),
9696
z: makeProjectionAttr('z')
9797
},
98+
connectgaps: scatterAttrs.connectgaps,
9899
line: {
99100
color: scatterLineAttrs.color,
100101
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
@@ -36,6 +36,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
3636
coerce('mode');
3737

3838
if(subTypes.hasLines(traceOut)) {
39+
coerce('connectgaps');
3940
handleLineDefaults(traceIn, traceOut, defaultColor, coerce);
4041
}
4142

Loading
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"data": [{
3+
"type": "scatter3d",
4+
"mode": "lines",
5+
"x": [0, 0, null, null, 0, 0],
6+
"y": [0, 1, 2, 3, 4, 5],
7+
"z": [2, 1, null, null, 0, 3],
8+
"connectgaps": false,
9+
"name": "gap in z"
10+
}, {
11+
"type": "scatter3d",
12+
"mode": "lines",
13+
"x": [1, 1, 1, 1, 1, 1],
14+
"y": [0, 1, null, null, 4, 5],
15+
"z": [2, 1, 2, 0, 0, 3],
16+
"connectgaps": false,
17+
"name": "gap in y"
18+
},{
19+
"type": "scatter3d",
20+
"mode": "lines",
21+
"x": [2, 2, null, null, 2, 2],
22+
"y": [0, 1, 2, 3, 4, 5],
23+
"z": [2, 1, 2, 0, 0, 3],
24+
"connectgaps": false,
25+
"name": "gap in x"
26+
}],
27+
"layout": {
28+
"title": "connect gaps test"
29+
}
30+
}

0 commit comments

Comments
 (0)