I am new using Grafana. I need to create a pie chart in Grafana from a postgreSQL datasource.
My table has the structure (time, user, count), and I would like to represent the maximum number of count per user, so I would need to have one section of the pie per user. Is that possible?
I have already read this topic regarding the pie chart:
but I couldn’t manage to get the desired result.
I have tried:
SELECT
now() as time,
MAX(count)
FROM
shema.table
GROUP BY user
But I only get all the pie in the same section with the value of the max count for all user, not the maximum per user.
The tag name of the pie chart I want to display is the value of metric, such as admin, but the tag name it displays is not what I want to display. As shown in the figure below:
Hey!
how do I create the pie chart without using now() as time.
I have a timestamp field which I want to use as time.
For eg if the value in timestamp field is 5/11/2021 it should count the values ahead of the date 5/11/2021.