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

[Metric Chart] New font-sizes handling might cause existing Metric charts to look off #2543

Closed
gvnmagni opened this issue Oct 7, 2024 · 4 comments · Fixed by #2548
Closed
Assignees
Labels
bug Something isn't working :metric Related to Metric chart

Comments

@gvnmagni
Copy link

gvnmagni commented Oct 7, 2024

In 8.15 a new handling of font-sizes has been introduced, moving it from being width-related to height-related. This was motivated by a series of considerations that are still valid but it could result in weird appearances for panels that are taller than large, or with very large numbers (lot of digits).

Example of problematic Metrics
Image

In order to solve this, I would propose to introduce a way to take in consideration also the width of panel when defining the font-size of values so that value don't get cut off.

I would see two approaches to implement this solution:

  1. Font-sizes are still determined according to break-points that take in consideration height of the panel, if the numbers are cut off their font-size automatically jumps to a smaller breakpoints, until it fit.

  2. Same but instead of jumping to a smaller breakpoint, we automatically swtich to FIT function and get back to DEFAULT function as soon as the panel gets back to be big enough

Both options have pros and cons in terms of final look & feel but both will solve the original issue.

Thanks to @MichaelMarcialis and @markov00 and @nickofthyme for the conversation around this topic.

@gvnmagni gvnmagni added the bug Something isn't working label Oct 7, 2024
@gvnmagni
Copy link
Author

gvnmagni commented Oct 8, 2024

Expected result of two proposed options:

Image

@nickofthyme nickofthyme added the :metric Related to Metric chart label Oct 8, 2024
@markov00 markov00 self-assigned this Oct 17, 2024
@muthu-mps
Copy link

@gvnmagni, @markov00 - The integrations upgraded to 8.15.0 needs to get upgraded to the latest version to get this issue resolved without any changes to the metric visualisation?

@nickofthyme
Copy link
Collaborator

Correct, changes from #2548 will be in @elastic/[email protected] and targeted to be in 8.16.1/8.17.0 (elastic/kibana#197473).

@markov00
Copy link
Member

probably also in 8.16.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working :metric Related to Metric chart
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants