Skip to content

Commit

Permalink
Merge pull request #5666 from plotly/fix-bar-get-color-mcc
Browse files Browse the repository at this point in the history
Fix bar get color
  • Loading branch information
archmoj authored May 19, 2021
2 parents a8d4bfd + 9a92c48 commit 2b58ca2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/traces/bar/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ function getBarColor(cd, trace) {
if(trace.type === 'waterfall') {
return trace[cd.dir].marker.color;
}
return cd.mc || trace.marker.color;
return cd.mcc || cd.mc || trace.marker.color;
}

module.exports = {
Expand Down
Binary file modified test/image/baselines/bar-colorscale-colorbar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions test/image/mocks/bar-colorscale-colorbar.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
"data": [
{
"type": "bar",
"textfont": {
"size": 24
},
"texttemplate": "%{y}",
"y": [
1,
2,
Expand Down

0 comments on commit 2b58ca2

Please sign in to comment.