Dashboards & Visualizations

How to display the count in piechart as labels

madanashok
Path Finder

Hi,

I want to get to display count as labels in piechart.

we have param truewhich dispaly percent as labels.
Likewise is there param to show count in piechart

Thanks

Tags (1)

abhijitsaoji
Explorer

It can be done, for example you query is stats count(xxx) as Total by yyy |eval yyy=yyy."-".Total . I used the same it worked for me. Though the count is displayed outside the chart not inside. but it works.

jaxxsplunk
Explorer

Using a pie chart graphic -This worked for me...so very cool!

Numbers are showing up per slice.

Following is the query code.

|stats count(ACTION) as Totals by ACTION

eval ACTION=ACTION."=".Total

 

fabiocaldas
Contributor

I used http://answers.splunk.com/answers/154860/how-to-aggregate-percentage-information-in-pie-chart-labels... that works like a charm

<option name="charting.chart.showPercent">true</option>

bamthauer
Explorer

Even my counts from the result are converted in %, nice!

0 Karma

HattrickNZ
Motivator

that works and details are here?
http://docs.splunk.com/Documentation/Splunk/7.0.3/Viz/ChartConfigurationReference#Pie_charts

slightly related, you would think you could should the actual values and not the percentages but it appears not to be the case. But it can be done as a gauge charting.chart.showValue

0 Karma

peter_krammer
Communicator

At the following Link you will find all possible options for charts.
http://docs.splunk.com/Documentation/Splunk/5.0.3/Viz/CustomChartingConfig-chartlegend

Unfortunatelly there is no option for showing the count.
But with the following "trick" you can include it manually:

... | stats count by foobar | eval foobar_slice = count + " " + foobar | fields foobar_slice, count

subhajit7430
New Member

Thanks. This query answered my question.

0 Karma

ggangwar
Path Finder

Thanks. I was also facing same issue and above suggestion solved it.

0 Karma

sayanidasgupta
Explorer

perfect for this problem, used it and got exact result what I was also looking for

0 Karma

smolcj
Builder

did u find out a way madanashok?
me too searching on this

0 Karma

madanashok
Path Finder

So there is no way to get it right.

0 Karma

madanashok
Path Finder

Is that no way to get it.Please some one pick it and tell me whether possible or not.

Thanks

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...

Design, Compete, Win: Submit Your Best Splunk Dashboards for a .conf26 Pass

Hello Splunkers,  We’re excited to kick off a Splunk Dashboard contest! We know that dashboards are a primary ...

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...