Skip to content

Commit 6c8a661

Browse files
committed
default fillcolor to marker.color
1 parent 04049f2 commit 6c8a661

File tree

5 files changed

+10
-4
lines changed

5 files changed

+10
-4
lines changed

src/traces/funnel/defaults.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,16 @@ function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
4343
coerce('textinfo');
4444
}
4545

46-
coerce('marker.color', defaultColor);
46+
var markerColor = coerce('marker.color', defaultColor);
4747
coerce('marker.line.color', Color.defaultLine);
4848
coerce('marker.line.width');
4949

5050
var connectorVisible = coerce('connector.visible');
5151
if(connectorVisible) {
52-
coerce('connector.fillcolor', Color.addOpacity(defaultColor, 0.5));
52+
var defaultFillcolor = Color.addOpacity(
53+
Lib.isArrayOrTypedArray(markerColor) ? markerColor[0] : markerColor, 0.5
54+
);
55+
coerce('connector.fillcolor', defaultFillcolor);
5356

5457
var connectorLineWidth = coerce('connector.line.width');
5558
if(connectorLineWidth) {

test/image/baselines/funnel_11.png

213 Bytes
Loading
-97 Bytes
Loading
Loading

test/image/mocks/funnel_custom.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@
2121
15,
2222
10,
2323
5
24-
]
24+
],
25+
"marker": {
26+
"color": "green"
27+
}
2528
},
2629
{
2730
"name": "2018",
@@ -74,8 +77,8 @@
7477
}
7578
},
7679
"connector": {
77-
"fillcolor": "#AAA",
7880
"line": {
81+
"color": "rgb(127,63,0)",
7982
"dash": 10,
8083
"width": 2
8184
}

0 commit comments

Comments
 (0)