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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...