What Grafana version and what operating system are you using?
Grafana v9.4.7 (4add91f03d)
What are you trying to achieve?
I’m creating some Gauge Panel where I calculate a score based on an existing data:
I wanted to create a gauge with something like
(Even if I formatted it in my dataset and could just use one field for the gauge and another field for the label)
Is this achievable using value mapping?
How are you trying to achieve it?
Using value mappings, I tried using mustache-like template syntax, like in other parts of the system. Nothing I tried worked, also couldn’t find anything in the docs.
What did you expect to happen?
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 stackoverflow, chatgpt, etc. The mustache notation was proposed by chatgpt, but it’s just wrong.
I imagined to be easy thing to do, but I couldn’t find any information online or being able to achieve.
So I’m wondering if there’s any “hidden way” or workaround to achieve this.
What is your data source? From the data sample you provided how does one get to 122 hrs (55) where do those values come from?
Hey, sorry for missing that out. They come from BigQuery. I already have them in the table view.
I just wanted to use the existing value in the gauge label by composing them.
Or I could generate this value manually in my dataset, by creating something like “human_label” column, but I would need to generate the visualization of the gauge using “score” and use “human_label” as the label for the gauge.
here is an example using sql server concat function
So I tried following such approach. The problem is that when using gauge panel, I need to select one field and a calculation method. So I have this table:
I created the
gauge_label field to be used by gauge panel, but it’s a string, so the gauge panel will not work as expected:
Label is correct, but the chart is not. So I need to select score field to be used to calculate the gauge meter:
So you want to have your and eat it too The next best thing I would recommend is apache echart for grafana where you have a whole lot more control
I’m not the admin of Grafana in my company, but it’s good to know, I didn’t know Apache ECharts for Grafana. I’ll try to pitch using it in our Grafana installation.
So I’m assuming what I want to achieve is not possible with Gauge Panel in Grafana, right?
Thanks for the help.