Splunk Search

Pie Chart - How to show my own field instead of Count% ?

fpedrosa
Engager

Hi,

I have this search:

| stats count by application
| eval application = case(
      application=="malware-detection", "Malware",
      !isnull(application), upper(substr(application,1,1)).substr(application,2)
      )
| eventstats sum(count) as total
| eval count_2=round(100*count/total,2)
| fields- total
| eval count_perc="".count_2."%"
| rename application as Application, count as Count

 

and I would like to show the Application, Count and count_perc fields on mu Pie Chart, but splunk still show the Count%.

fpedrosa_0-1664194189697.png



My goal is to round the percentage, how can I do this?

Thanks for support!

Labels (1)
0 Karma

FelixLeh
Contributor

The percentage shown is calculated as part of the Pie Chart Visualisation. As far as I know there are no Formatting Options (UI or SourceCode) that can change this. So the only way I can imagine is to make a custom visualisation that is an exact copy of the Splunk-Build Pie Chart and modify the code in there. 
But I don't know if that effort is worth it.

My only other guess would be to look into the code of the page and see if there is a possibility to modify it through HTML Code Inserted into the XML Code of the Dashboard but that's a far stretch

_______________________________________

If this was helpful please consider awarding Karma. Thx!

0 Karma
Get Updates on the Splunk Community!

New Year, New Changes for Splunk Certifications

As we embrace a new year, we’re making a small but important update to the Splunk Certification ...

Stay Connected: Your Guide to January Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...

[Puzzles] Solve, Learn, Repeat: Reprocessing XML into Fixed-Length Events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...