Skip to content
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

Replace offsetX and offsetY with padding in ValueLabels #1375

Open
markov00 opened this issue Sep 13, 2021 · 0 comments
Open

Replace offsetX and offsetY with padding in ValueLabels #1375

markov00 opened this issue Sep 13, 2021 · 0 comments
Labels
:annotation Annotation (line, rect, text) related issue enhancement New feature or request :styling Styling related issue :theme :xy Bar/Line/Area chart related

Comments

@markov00
Copy link
Member

Is your feature request related to a problem? Please describe.
The current offsetX and offsetY property used in the bar value labels, is used to push the label far from the geometry edges. It basically represents the same behavior of a padding but without the hassle of configuring the offset based on the rotation.

Describe the solution you'd like
We can replace the offsets with a single padding value, this should cover the general cases and it can also improve situations like the following where the label is centered by has an offset of 2px. The label on the blue bar should be anyway centered, the padding can be ignored to correctly fill all the text in the center, or completely remove the value if it doesn't fit in width together with his padding.
Screenshot 2021-09-13 at 10 18 20

Additional context
see elastic/eui#4845

@markov00 markov00 added enhancement New feature or request :annotation Annotation (line, rect, text) related issue :styling Styling related issue :xy Bar/Line/Area chart related :theme labels Sep 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:annotation Annotation (line, rect, text) related issue enhancement New feature or request :styling Styling related issue :theme :xy Bar/Line/Area chart related
Projects
None yet
Development

No branches or pull requests

1 participant