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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...