Closed jarvas24 closed 3 years ago
Is anyone working on this? If not then I want to work on this.
No one is working on it as far as I know, and we'd love the help! The right place to solve this is in the underlying Javascript library Plotly.js. We've actually got code that does this for pie charts and treemaps I believe, so it may be quite straightforward to port it to bars :)
@archmoj or @alexcjohnson can advise.
Looks like this is getting fixed in https://github.com/plotly/plotly.js/pull/5666 actually :)
Current Behavior (plotly version 4.14.3)
When using the
text
property in a bar trace with a continuous color scale, thetextfont.color
is static; all bars use the same text color, which results in difficult to read text for some bars (far right bar in screenshot).Expected/Desired Behavior
The text font color should be dynamic (dark text on light colored bars, light text on dark bars), just like the hover text. Bar traces with discrete colorscales already have this behavior: