How to abbreviate time duration?

I have a graph that has time->duration(ms) set as its y axis unit. The axis labels are like “2 minutes”, or “2 minutes 10 seconds” if I set decimals to 1. This is too long. Is is possible to abbreviate it to “2m10s” or something similar? I tried “millisenconds” instead, but then I get “2.167 minutes”, which is even worse.

IThose are the current options for time formatting in Grafana - there isn’t a shorter format for duration. Just tested with milliseconds (or seconds) and no decimal places and got this which I think is closer to what you want - unless the seconds are important?

1 Like

Thanks, I tried it, but it’s only useful if the minimum value is set to 0. Otherwise, it will show something like ‘2 minutes - 2 minutes - 3 minutes’, which is not very helpful.

Your screenshot already abbreviates somewhat. My version writes out the full “2 minutes” text. Having “2 min” instead of that would still be better than nothing. What are your settings?

Nothing special - just chose Time -> milliseconds as the Unit and left the Decimals field empty.

I have the exact same settings as you daniellee, and just like kangirigungi this results in the following y-axis unabbreviated unit.

No, you don’t. I have milliseconds(ms) as the unit, you chose duration(ms).

See my OP, “milliseconds” works in a differently bad way than “duration(ms)”. And no, setting decimals to 0 doesn’t help, because that gives too low resolution. What I need is “3m 15s” or “3min 15sec”, not “3min” or “3.25 min”.

My answer is still the same. It is not something the core team is working on but we would absolutely accept it as a PR.

Hi, I hope you will help me to solve my problem. I need to show in Grafana dashboards, where y-axes is duration on site (00:02:53) format. I use Postgre database. my database contained next table^
Datestamp( datatype^ date) Duration (datatype: time)
2018-01-01 00:02:53

It is not possible to have time on the y-axis in the graph panel.

Maybe the plotly panel would work for you: https://grafana.com/plugins/natel-plotly-panel