- What Grafana version and what operating system are you using?
- Grafana v7.5.4 (615c153b3a), Amazon Linux
Hi, I’m trying to get a simple pie chart working. Data looks like:
column_a | column_b 3430 | 21 3431 | 1 3432 | 3 ...
Column A is used in the group by, and column B is the summed metric:
SELECT column_a, sum(column_b) FROM mytable WHERE created_at BETWEEN FROM_UNIXTIME(1652820137) AND FROM_UNIXTIME(1652830937) GROUP BY column_a ORDER BY UNIX_TIMESTAMP(created_at) DIV 60 * 60
This works fine with the Table visualization, but with Pie chart v2, I get both columns treated as separate series, which doesn’t make sense.
I tried to hide (Transform > Organize fields) column A, and then the chart does make sense, however now I don’t get the labels I need (i.e. the values from column A); instead each slice of the pie has the same label (“column_b”).
I used to use an older version of Grafana with graphite and pie charts used to be a piece of cake (no pun intended). This seems like an extremely simple use case but I’m struggling.