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] support strings #1801

Closed
3 tasks done
drewdaemon opened this issue Aug 23, 2022 · 4 comments · Fixed by #1817
Closed
3 tasks done

[Metric] support strings #1801

drewdaemon opened this issue Aug 23, 2022 · 4 comments · Fixed by #1817
Labels
enhancement New feature or request kibana cross issue Has a Kibana issue counterpart :metric Related to Metric chart

Comments

@drewdaemon
Copy link
Contributor

Is your feature request related to a problem? Please describe.
We would like to support string values in the Lens metric visualization in Kibana. One use case is displaying the last value of a server status field: "up" or "down."

Describe the solution you'd like
The metric should accept a string value as well as a numeric value for the primary metric. Since a non-numeric value doesn't make sense in the context of a progress bar or a trend line, this probably means a new type of metric datum interface that can accept a string value, while the others maintain the numeric constraint.

Describe alternatives you've considered
I don't see any alternative.

Kibana Cross Issues
elastic/kibana#137756

Checklist

  • this request is checked against already exist requests
  • every related Kibana issue is listed under Kibana Cross Issues list
  • kibana cross issue tag is associated to the issue if any kibana cross issue is present
@drewdaemon drewdaemon added enhancement New feature or request kibana cross issue Has a Kibana issue counterpart :metric Related to Metric chart labels Aug 23, 2022
@markov00
Copy link
Member

cc @gvnmagni could you check what does this means in terms of font-size/available space/text wrapping?

@gvnmagni
Copy link

The component was initially designed to allow, when at its width minimum size, a number with up to 7 chars (0000.000) without any problem. Since we got rid of the width minimum and we accept that the value might be cut when too long it seems that we could also accept text strings without having to be worried about length.

We just have to be aware that we are relying on the user "common sense" to enlarge the metric panel (once in a dashboard) to avoid cutting texts.

@markov00
Copy link
Member

@gvnmagni Do you think we should keed the same font size for text? Do we need to truncate the text or just make it overflow the chart?

@gvnmagni
Copy link

I would keep the same font-size, yes, and truncating seems a good idea so let's try that! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request kibana cross issue Has a Kibana issue counterpart :metric Related to Metric chart
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants