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

Field format : add suffix option #8984

Closed
fbaligand opened this issue Nov 5, 2016 · 14 comments
Closed

Field format : add suffix option #8984

fbaligand opened this issue Nov 5, 2016 · 14 comments
Labels
Feature:FieldFormatters Feature:Kibana Management Feature label for Data Views, Advanced Setting, Saved Object management pages impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. loe:medium Medium Level of Effort release_note:enhancement

Comments

@fbaligand
Copy link
Contributor

When we define a custom format for a field, it would be great to add an optional parameter "unit" for number types to define a custom unit measurement.

For example, for a "duration" field, it allows to define "ms" as measurement unit.
And when, it is displayed in a kibana visualization, for value 12, it renders 12 ms

@thomasneirynck
Copy link
Contributor

What do you have in mind specifically?

  • the ability to add a piece of text somewhere in the format.
  • the auto-conversion of values based on the UOM (e.g. similar to bytes, which can format to kb, Mb, ...)

The first case would be easier.

In the second case, the conversion would really depend on the quantity kind of the UOM. Duration (seconds, hours, days, weeks, ...), distances (ft, meter, mile, ...) all would need different conversion rules.

@fbaligand
Copy link
Contributor Author

@thomasneirynck
I mean the first option.

Add just a custom "text suffix" indicating measurement unit (ms, kg, ml, ...).

@epixa epixa removed the P3 label Apr 25, 2017
@timroes timroes added Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Kibana Management Feature label for Data Views, Advanced Setting, Saved Object management pages and removed Team:Visualizations Visualization editors, elastic-charts and infrastructure :Management DO NOT USE labels Nov 27, 2018
@wylieconlon wylieconlon changed the title Field format : add unit option Field format : add suffix option Jan 31, 2020
@wylieconlon
Copy link
Contributor

Changed the description to suffix only

@digitalw
Copy link

Has this issue been addressed? is there a way to add units to durations?

@wylieconlon
Copy link
Contributor

Fixed in 7.10 by #76729

@fbaligand
Copy link
Contributor Author

Hi,

  • First, thanks a lot for this new feature!
  • But I have to say that the feature is not as powerful as I expect
  • With a simple checkbox on a "Duration" field format, you can not define a custom unit like "kg", "dl", "miles/h", ...
  • Thus, you cannot define a duration "shortcut" unit like "ms". "Milliseconds" is very long to display on a visualization.
  • Finally, I'm sad to see some incoherence with APM application that displays durations in milliseconds with "ms" suffix (especially because it is short).

@wylieconlon
Copy link
Contributor

Durations and bytes are the main formatters we have with variable units, where the value is not stored in the same format as its output and where the output might change based on the quantity. We also use a suffix in Lens with the "normalized time" option that can display "/s" or "/h" rates. I wasn't sure that there was a need for a static suffix like kg that would be repeated multiple times per visualization, when you can add the suffix to the field name/dimension label like weight (kg). Is this the feature you're asking for, static suffixes with a text input?

Also, the more powerful duration formatter that APM uses is in the process of being added to index patterns, and has a separate issue tracking it- didn't mention it earlier.

@fbaligand
Copy link
Contributor Author

Thanks for your answer and your explanations.
I see in PR #100540, that there will be a "Use short suffix" option. That's nice!

And yes, I would like a "text" suffix, available for "Number" (and eventually "Color") field formats.
The suffix can be anything, including a currency (EUR) or a thing (products).

@wylieconlon
Copy link
Contributor

Okay, reopening as we don't have what you're asking for.

I assume that we want composable formatters, so that you can use a number formatter with an additional suffix.

@wylieconlon wylieconlon reopened this May 27, 2021
@fbaligand
Copy link
Contributor Author

Yes, it is not a specific formatter, but a new option in ‘number’ formatter.

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServicesSv)

@flash1293 flash1293 removed the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Nov 19, 2021
@exalate-issue-sync exalate-issue-sync bot added impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. loe:small Small Level of Effort labels Dec 13, 2021
@exalate-issue-sync exalate-issue-sync bot added loe:medium Medium Level of Effort and removed loe:small Small Level of Effort labels Dec 13, 2021
@ppisljar
Copy link
Member

ppisljar commented Aug 9, 2022

Thank you for contributing to this issue, however, we are closing this issue due to inactivity as part of a backlog grooming effort. If you believe this feature/bug should still be considered, please reopen with a comment.

@ppisljar ppisljar closed this as not planned Won't fix, can't repro, duplicate, stale Aug 9, 2022
@fbaligand
Copy link
Contributor Author

fbaligand commented Aug 9, 2022

That is really sad to close issues, just because there is no activity.
There is nothing to say more than to ask the enhancement.
Concerning this feature, this is especially frustrating to see that APM application has implemented this feature, but it's not implemented for standard visualizations...
If it is useful for APM application, it should be useful for any visualization.
image

@fbaligand
Copy link
Contributor Author

so please re-open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:FieldFormatters Feature:Kibana Management Feature label for Data Views, Advanced Setting, Saved Object management pages impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. loe:medium Medium Level of Effort release_note:enhancement
Projects
None yet
Development

No branches or pull requests

9 participants