Skip to content

Commit b9a471e

Browse files
committed
dflts: fix inheritance logic from line.color -> marker
- fix typo in line.color -> marker.color logic - don't make marker.line.color inherit from line.color if line.color is an array.
1 parent 2485ff4 commit b9a471e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/traces/scatter/marker_defaults.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ var subTypes = require('./subtypes');
1818

1919
module.exports = function markerDefaults(traceIn, traceOut, defaultColor, layout, coerce) {
2020
var isBubble = subTypes.isBubble(traceIn),
21-
lineColor = !Array.isArray(traceIn.line) ? (traceIn.line || {}).color : undefined,
21+
lineColor = (traceIn.line || {}).color,
2222
defaultMLC;
2323

24+
// marker.color inherit from line.color (even if line.color is an array)
2425
if(lineColor) defaultColor = lineColor;
2526

2627
coerce('marker.symbol');
@@ -34,8 +35,9 @@ module.exports = function markerDefaults(traceIn, traceOut, defaultColor, layout
3435

3536
// if there's a line with a different color than the marker, use
3637
// that line color as the default marker line color
38+
// (except when it's an array)
3739
// mostly this is for transparent markers to behave nicely
38-
if(lineColor && (traceOut.marker.color !== lineColor)) {
40+
if(lineColor && !Array.isArray(lineColor) && (traceOut.marker.color !== lineColor)) {
3941
defaultMLC = lineColor;
4042
}
4143
else if(isBubble) defaultMLC = Color.background;

0 commit comments

Comments
 (0)