Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add fill gradients for scatter traces #6905

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 6, 2024
Prev Previous commit
Next Next commit
Removing traceIn.fillgradient check in fillColorDefaults
  • Loading branch information
lumip committed Mar 5, 2024
commit 839326b51267d9b81789d9546ea32d36a1771d34
17 changes: 9 additions & 8 deletions 17 src/traces/scatter/fillcolor_defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,18 @@ module.exports = function fillColorDefaults(traceIn, traceOut, defaultColor, coe
}

var averageGradientColor;
if(traceIn.fillgradient) {
var gradientOrientation = coerce('fillgradient.type');
if(gradientOrientation !== 'none') {
coerce('fillgradient.start');
coerce('fillgradient.stop');
var gradientColorscale = coerce('fillgradient.colorscale');

// if a fillgradient is specified, we use the average gradient color
// to specifiy fillcolor after all other more specific candidates
// to specify fillcolor after all other more specific candidates
// are considered, but before the global default color.
// fillcolor affects the background color of the hoverlabel in this case.
var gradientOrientation = coerce('fillgradient.type');
if(gradientOrientation !== 'none') {
coerce('fillgradient.start');
coerce('fillgradient.stop');
coerce('fillgradient.colorscale');
averageGradientColor = averageColors(traceOut.fillgradient.colorscale);
if(gradientColorscale) {
averageGradientColor = averageColors(gradientColorscale);
}
}

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.