Trying to get a pie chart from a json query with just a strings as the result of the original query

I have a table of data including a column called os_class that can contain multiple entries,
WINDOWS,UNIX,LINUX etc.
I have already had to run 2 transformers to process the json output of my original query.
The issue I’m having is I would like to create a pie chart using group by os_class and have a count of all the rows that are in os_class for each group by.
ie: WINDOWS 20, UNIX 5, LINUX 50 but i can’t see a way to do it … Any suggestions.

Hi @myates61,

Thanks for opening this post.

Can you please try to reproduce this same issue on https://play.grafana.org/ and then share the dashboard link so that we can view it?

There is JSON Infinity Datasource plugin which you can use to reproduce (or mock the data).

Thanks

Hi @myates61

Not sure if you already find a solution to this. I recently created a mockup panel and was able to do what you are looking for.

I have different categories and then to calculate them, I applied transformations to get a percentage in a pie chart.

You can edit it as a viewer (cannot save changes), look into the Transformation tab and also look into the suggested panel as you see more scope in other panels for the same query.

I hope this helps.

Thanks … I will have to revisit this as other things happened

Hello

Is your datasource a database, if so which kind?
Or is it a json data source?