Skip to content

Commit fe9850c

Browse files
committed
Add optional overrides to contour handleStyleDefaults
1 parent c2994e7 commit fe9850c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/traces/contour/style_defaults.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
var colorscaleDefaults = require('../../components/colorscale/defaults');
1313

1414

15-
module.exports = function handleStyleDefaults(traceIn, traceOut, coerce, layout) {
15+
module.exports = function handleStyleDefaults(traceIn, traceOut, coerce, layout, defaultColor, defaultWidth) {
1616
var coloring = coerce('contours.coloring');
1717

1818
var showLines;
1919
if(coloring === 'fill') showLines = coerce('contours.showlines');
2020

2121
if(showLines !== false) {
22-
if(coloring !== 'lines') coerce('line.color', '#000');
23-
coerce('line.width', 0.5);
22+
if(coloring !== 'lines') coerce('line.color', defaultColor || '#000');
23+
coerce('line.width', defaultWidth === undefined ? 0.5 : defaultWidth);
2424
coerce('line.dash');
2525
}
2626

0 commit comments

Comments
 (0)