@@ -19,13 +19,14 @@ var subTypes = require('./subtypes');
19
19
// common to 'scatter', 'scatter3d', 'scattergeo' and 'scattergl'
20
20
module . exports = function markerDefaults ( traceIn , traceOut , defaultColor , layout , coerce ) {
21
21
var isBubble = subTypes . isBubble ( traceIn ) ,
22
+ isScatter3d = traceIn . type === 'scatter3d' ,
22
23
lineColor = ( traceIn . line || { } ) . color ,
23
24
lineColorscale = ( traceIn . line || { } ) . colorscale ,
24
25
defaultColorscale ,
25
26
defaultMLC ;
26
27
27
- if ( lineColor ) defaultColor = lineColor ;
28
- if ( lineColorscale ) defaultColorscale = lineColorscale ;
28
+ if ( ! isScatter3d && lineColor ) defaultColor = lineColor ;
29
+ if ( ! isScatter3d && lineColorscale ) defaultColorscale = lineColorscale ;
29
30
30
31
coerce ( 'marker.symbol' ) ;
31
32
coerce ( 'marker.opacity' , isBubble ? 0.7 : 1 ) ;
@@ -42,7 +43,7 @@ module.exports = function markerDefaults(traceIn, traceOut, defaultColor, layout
42
43
// if there's a line with a different color than the marker, use
43
44
// that line color as the default marker line color
44
45
// mostly this is for transparent markers to behave nicely
45
- if ( lineColor && ( traceOut . marker . color !== lineColor ) ) {
46
+ if ( ! isScatter3d && lineColor && ( traceOut . marker . color !== lineColor ) ) {
46
47
defaultMLC = lineColor ;
47
48
}
48
49
else if ( isBubble ) defaultMLC = Color . background ;
0 commit comments