Change value labels colors depending on background #238
Labels
:annotation
Annotation (line, rect, text) related issue
:colors
colors related issue
enhancement
New feature or request
:Lens
Kibana Lens related issue
:xy
Bar/Line/Area chart related
Is your feature request related to a problem? Please describe.
A value label on a bar chart can be colored with a color that is good for some bars but can be a problem with some other backgrounds.
For example if I'm using a white text color for the value label, but the label fall outside the bar the label will disappear.
The same with a black text color and a dark background.
To Reproduce
Steps to reproduce the behavior:
(originally from #454) Labels are always drawn with a single color, default black, so there is a contrast issue. I've taken the storybook example and added offsetY of 10:
As you can see in the example, black text is draw on highly saturated bars which is not as contrasty as it could be.
Describe the solution you'd like
Automatically or manually configure colors for labels outside bars
Describe alternatives you've considered
few possibilities:
cc @cchaos I'd like to have also your idea on that
Additional context
n/a
Kibana Cross Issues/PR
Checklist
Kibana Cross Issues
listkibana cross issue
tag is associated to the issue if any kibana cross issue is presentThe text was updated successfully, but these errors were encountered: