Legend Customisation - Azure Data Explorer

  • What Grafana version and what operating system are you using?

  • What are you trying to achieve?
    I am trying to convert the Legends to a proper format.

  • How are you trying to achieve it?
    I want to do that either inside the query. (I am using Azure Data Explorer, which needs queries in KQL).

OR, from Value Mapping or from Override options in the visual pannel.

  • What happened?
    I couln’t figure out how to do that.

  • What did you expect to happen?

I want to convert
"ValueAsReal {Meta1=“Clear Water”, Meta2=“CWT1 In pH”, Meta3=“AIT1879”, Metadata_Units=“pH”}"


Meta 3 = Meta3="AIT1879"

  • Can you copy/paste the configuration(s) that you are having problems with?


  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.


  • Did you follow any online instructions? If so, what is the URL?

I tried Value Mapping but It is not working. I tried to use the Regex option, but I couldn’t do anything.

You can achieve this with the “Rename by regex” transform, using something like:
Match: .*Meta3=(.*?),.*
Replace: Meta3=$1


1 Like

thank you so much. It solved the issue. :slight_smile: