Splunk Search

How to display a count in the labels on my pie chart?

prashanthberam
Explorer

hi guys...

I want to display the count in the labels in the pie chart, and in the title, I want to display another count above the pie chart

Will that be possible, and if yes, can you please tell me how to do that?

thanks advance
alt text

0 Karma

gokadroid
Motivator

If this pie chart is part of dashboard panel then yes both are possible. Setting of the labels however can be achieved with or without the pie chart being as a panel though. If your Success and Failure are plotted in pie chart using field myStatusField as follows:

your query to return myStatusField
| stats count by myStatusField

Then change the above query to the one as below:

your query to return myStatusField
| stats count by myStatusField
| eval myStatusField=myStatusField." : ".count

For setting the title of pie chart (which will be panel title) with a search you have to first populate a token with the search result and then use the token value in the title of the panel. Have a look at similar example here:

https://answers.splunk.com/answers/374043/why-am-i-unable-to-populate-a-token-with-the-resul.html

0 Karma

prashanthberam
Explorer

can i change those sclise name instead of success and failure

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...