Hide “Current:” / "Min" / "Max" from Graph Legend

I see this question was asked in 2021, I think I remember having the same concern at that time.

How could I hide the text string “Current:” from the legend? It makes it unreadable, takes up a whole lot of space. I want to see the numerical current value of each signal, and the name of each signal in the legend. But I don’t need to see the clutter of 10x Current: strings littered about.

Could the “Current:” string optionally be replaced with a string such as " "?

Thanks!

Hi @dalklein

Can you share your query results in table format, as well as a screenshot of the Legend settings you currently have in the right side settings panel?

My initial guess is that you can fix this by doing Rename by Regex.

Oh, you mean use a regex to create the alias field? I could see that working.

I’m not sure what ‘query results in table format’ means. This?

See these examples of Rename by Regex. I used it to trim down the labels from this:

to this:

using this Regex:
/ElectricPowerOperations.sum { region: ([^}]+)\}/

Thanks for the idea. I don’t see how to do it though. ‘Current:’ is added by the legend option, it’s not part of the series name. So it looks like the regex doesn’t match anything?

Just for fun, can you switch to the Time Series visualization?

and then what do you have in the Values box? By “current”, do you want the latest (last) value?

Thanks, I use Current or Last so I can see the numerical value of each signal in the legend. As far as I can tell, it does the same thing with the new Time series as with the old graph.

Hi, I’m not sure you can remove “Current” from the legend, but have you tried setting the legend format to Table instead of list? It’s much more readable then and might be enough for you?

I think @dawiddebowski is correct. See this similar post & conclusion (I think the same post mentioned at the start of this thread):

That could work. It only says ‘Current:’ once. But it runs out of space without needing to scroll the legend. I’ve got too many lines…

If an option like showing current / last / etc applies to every signal on the chart / legend, why does it need to tack the text onto every signal label in the legend.

You could also tweak the tooltip to show all series. I guess in your plots where often series overlap it would also be a nice feature.

As for why it shows “current” every time I can think of two possibilities:

  1. A simple map in JS was… simpler than setting it only to the first element.
  2. Better UX because you don’t have to come back to the first series to remind yourself what this value represents. Also, if you’re not familiar with Grafana, you could find it confusing that in one legend entry there’s Current and for the others there are just some random values.

By ‘tweak the tooltip to show all series’, you mean when floating over the plot it shows the values at that point in time. Yes I use that sometimes.

If I ran it from source, I guess changing this spot would take care of it?