Skip to content

Commit 6b94edd

Browse files
committed
do not apply line --> marker color defaulting on scatter3d plots
1 parent a161fa7 commit 6b94edd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/traces/scatter/marker_defaults.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@ var subTypes = require('./subtypes');
1919
// common to 'scatter', 'scatter3d', 'scattergeo' and 'scattergl'
2020
module.exports = function markerDefaults(traceIn, traceOut, defaultColor, layout, coerce) {
2121
var isBubble = subTypes.isBubble(traceIn),
22+
isScatter3d = traceIn.type === 'scatter3d',
2223
lineColor = (traceIn.line || {}).color,
2324
lineColorscale = (traceIn.line || {}).colorscale,
2425
defaultColorscale,
2526
defaultMLC;
2627

27-
if(lineColor) defaultColor = lineColor;
28-
if(lineColorscale) defaultColorscale = lineColorscale;
28+
if(!isScatter3d && lineColor) defaultColor = lineColor;
29+
if(!isScatter3d && lineColorscale) defaultColorscale = lineColorscale;
2930

3031
coerce('marker.symbol');
3132
coerce('marker.opacity', isBubble ? 0.7 : 1);
@@ -42,7 +43,7 @@ module.exports = function markerDefaults(traceIn, traceOut, defaultColor, layout
4243
// if there's a line with a different color than the marker, use
4344
// that line color as the default marker line color
4445
// mostly this is for transparent markers to behave nicely
45-
if(lineColor && (traceOut.marker.color !== lineColor)) {
46+
if(!isScatter3d && lineColor && (traceOut.marker.color !== lineColor)) {
4647
defaultMLC = lineColor;
4748
}
4849
else if(isBubble) defaultMLC = Color.background;

0 commit comments

Comments
 (0)