5

I have a single stat view that displays true or false based on the last value correctly from the data. However, I wish to map this to the text as follows:

  • false -> Radiator Off
  • true -> Radiator On

I've tried the values 0, 0.0, true and false in the value mappings and nothing seems to change what is on screen. If I have a null mapping and do something such as average the values this correctly displays the text. I've also listed my data in a table view and this shows 0.0 and 1.0 for the true/false states.

Does Grafana text mapping work with boolean values? There is nothing in the help that mentions anything about booleans.

0

1 Answer 1

13

I think because we're using Grafana to visualize time series data, therefore values should only in numeric or null.

Grafana don't have text mapping, I think you're referring Value Mappings.

You can convert boolean values from your query to numeric, such as true to 1 and false to 0, Value Mappings will work.

I've tried on https://play.grafana.org/ for mapping from 0 to Off and 1 to On, it worked well :D

Thanks for reading !!

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.