Dashboards & Visualizations

Displaying count as label in pie graph

anusuya_k
New Member

Hi,
I have a pie graph which shows slices based on the count in each category. On splunk interface, I can see the actual count on each slice using tooltip. But when I export to a pdf, tooltip option will not be available, so counts are not visible.

Is there any way to display count on pie chart slices as labels? I have tried a few suggestions seen in the forum like using layout sprite etc, but none of them worked.

Please let me know whether it is possible at all to do this in splunk, and if so how to do it.

Thanks

Tags (1)
0 Karma
1 Solution

Gilberto_Castil
Splunk Employee
Splunk Employee

You can alter the given label after the chart has been rendered. For example, if you had a search that produces a simple count using top:

 * earliest=-15m | top sourcetype

That may produce a pie chart like this one:

alt text

Understand that your label is derived from column 1 or the "sourcetype" field. After the table has been generated, modify column 1 to include the count.

 | eval sourcetype=sourcetype." count:".count

That will render something like this:

alt text

All together your search would look like this:

* earliest=-15m | top sourcetype | eval sourcetype=sourcetype." count:".count

gc

View solution in original post

Gilberto_Castil
Splunk Employee
Splunk Employee

You can alter the given label after the chart has been rendered. For example, if you had a search that produces a simple count using top:

 * earliest=-15m | top sourcetype

That may produce a pie chart like this one:

alt text

Understand that your label is derived from column 1 or the "sourcetype" field. After the table has been generated, modify column 1 to include the count.

 | eval sourcetype=sourcetype." count:".count

That will render something like this:

alt text

All together your search would look like this:

* earliest=-15m | top sourcetype | eval sourcetype=sourcetype." count:".count

gc

anusuya_k
New Member

your suggestion worked perfectly well. Thanks a ton.

0 Karma

clymbouris
Path Finder

I'm not sure if that's possible with the built-in pie graph but this sweet app might be what you're looking for: http://splunk-base.splunk.com/apps/56187/donut-charts

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...