How to put a percentage on a Pie Chart panel?


I have some issues on how to configure a Pie Chart panel.
I want to put a percentage on a Pie Chart. The received value in the Query inspector is 96.6749. (see screenshots)
But if I ad a second query my slices are 50%. Which query function do I have to use to display it correctly? I have looked for a math query function but that don’t exists.
And am correct that there isn’t any documentation for a Pie Chart Panel? (I have looked everywhere but so far I didn’t find anything)

Thank you for any help!



turn on ‘Show Percentage’

1 Like

Thank you for your answer.
But If I have 1 query it shows 100%.

So I have to add a second query but then it shows 50% for bolth queries.
How can I add the correct math function in the query. (in the Pie Chart plugin)

What do you expect it to show? The total on the chart must obviously add up to 100%.

I expect it to show the correct percentage.
If I have a value 97 (like in the pictures above) that it should shows a slice for 97% and a slice for the remaining 3%. (the total 100% -97%)
And how do I archive this 2 slices?


I think i’m having a similar (or the same) problem…
I have to display in a pie chart the availability of a host on the network, but I’m not able to figure out how I can show on the chart how long it stayed up and down, proportionally.

In the example below I have a host with connection problems. The top panel shows packet loss and the bottom one should show in proportion how many responses were up (1) and how many were down (0)

the “total” value is the amount of response it got (1 per minute in the last 6 hours). I also have the total of “up” answers (value 1), now I want to know how do I get the total of “down” answers (value 0)

here are the functions I used to get these values:

ps: I already tried the function “RemoveBelowValue” (with te value “1”) to get the “0” values but it didn’t work

it keeps bringing me the total value of pings

I don’t know if I managed to express it correctly but I hope someone can help.

Welcome @rogerbloise!

I suspect that you also use the zabbix data-source?
I have first configured the correct items in Zabbix and then displayed in grafana.

First you need to verify if it is correctly displayed in Zabbix.
And then you can manually calculate how big the percentage should be, before looking to grafana.

Hi, @staelensjarne. Thanks for you answer!

Yes, i’m using the zabbix data-source.

I think i found a solution.

Actually, since the item returns values “0” or “1” this was the only way i found to solve the problem (is working so far):

i’m pretty sure there is a much better way to handle this but i’m busy with a lot of work and for now i’ll keep this. :sweat_smile:

Thank you again