Skip to content

Commit 839326b

Browse files
committed
Removing traceIn.fillgradient check in fillColorDefaults
1 parent 4e5adb8 commit 839326b

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/traces/scatter/fillcolor_defaults.js

+9-8
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,18 @@ module.exports = function fillColorDefaults(traceIn, traceOut, defaultColor, coe
2828
}
2929

3030
var averageGradientColor;
31-
if(traceIn.fillgradient) {
31+
var gradientOrientation = coerce('fillgradient.type');
32+
if(gradientOrientation !== 'none') {
33+
coerce('fillgradient.start');
34+
coerce('fillgradient.stop');
35+
var gradientColorscale = coerce('fillgradient.colorscale');
36+
3237
// if a fillgradient is specified, we use the average gradient color
33-
// to specifiy fillcolor after all other more specific candidates
38+
// to specify fillcolor after all other more specific candidates
3439
// are considered, but before the global default color.
3540
// fillcolor affects the background color of the hoverlabel in this case.
36-
var gradientOrientation = coerce('fillgradient.type');
37-
if(gradientOrientation !== 'none') {
38-
coerce('fillgradient.start');
39-
coerce('fillgradient.stop');
40-
coerce('fillgradient.colorscale');
41-
averageGradientColor = averageColors(traceOut.fillgradient.colorscale);
41+
if(gradientColorscale) {
42+
averageGradientColor = averageColors(gradientColorscale);
4243
}
4344
}
4445

0 commit comments

Comments
 (0)