Dashboards & Visualizations

Will you help me show percentage in 100% stacked bar chart?

john_q
Explorer

i have two fields such as "request_time" and "app_error".

I need to show the count and percentage as well. This is working fine when I am using pie chart. But i want to use a 100% stacked bar chart. So, whenever i mouse over to the bar, it has to show count and percentage like if count is "request_time 62 percentage 68.2%" and "app_error 44 percentage 32%" like pie chart.

0 Karma

mayurr98
Super Champion

hey, have you looked at @niketnilay's answer?
https://answers.splunk.com/answers/598632/add-percent-sign-on-a-stacked-column-chart-data-la.html

let me know if this helps!

0 Karma

john_q
Explorer

Hi @mayurr98 , thanks for the reference but i don't want to use the script. i am looking for a query which shows percentage. for example request_time count is 622 and app_error count is 350 then when i mouse over on the bar display request_time 62.2% and app_count is remaining % out of 100%.

0 Karma

mayurr98
Super Champion

I do not think its possible through query or XML as pie chart has that option already but you will have to use a script to add "%" sign for the stacked bar chart.
let's see if anyone has a better idea for this or if it is solvable through query.

0 Karma

john_q
Explorer

its working fine but x axis field names are not displaying like by cause.

stats count(type) as names sum(bytes) as Bytes by browsers | addtotals fieldname=_Total | foreach * [eval <> = '<>' * 100 / _Total] | fields - _Total

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

Splunk is officially part of Cisco

Revolutionizing how our customers build resilience across their entire digital footprint.   Splunk ...

Splunk APM & RUM | Planned Maintenance March 26 - March 28, 2024

There will be planned maintenance for Splunk APM and RUM between March 26, 2024 and March 28, 2024 as ...