Skip to content

Commit 2b58ca2

Browse files
authored
Merge pull request #5666 from plotly/fix-bar-get-color-mcc
Fix bar get color
2 parents a8d4bfd + 9a92c48 commit 2b58ca2

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

src/traces/bar/style.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ function getBarColor(cd, trace) {
158158
if(trace.type === 'waterfall') {
159159
return trace[cd.dir].marker.color;
160160
}
161-
return cd.mc || trace.marker.color;
161+
return cd.mcc || cd.mc || trace.marker.color;
162162
}
163163

164164
module.exports = {
1.74 KB
Loading

test/image/mocks/bar-colorscale-colorbar.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
"data": [
33
{
44
"type": "bar",
5+
"textfont": {
6+
"size": 24
7+
},
8+
"texttemplate": "%{y}",
59
"y": [
610
1,
711
2,

0 commit comments

Comments
 (0)