Splunk Search

How to show values and percentages on hover over columns in 100% stacked column chart?

AlexMcDuffMille
Communicator

Hello,

I have a graph that I'm displaying as a 100% stacked column chart. Even though the Y-Axis is set to 0-100 I still see just the raw/absolute values when I mouse over the colored sections of the columns. Is there a way to make Splunk show the raw/absolute value and the percentage, like it does with the pie chart?

I've been able to get around this in one of my searches by using the "appendcols" command and then taking the percent of one column compared to both added together, but I'm not positive that method will work very well when I have more than 2 series.

Thanks,

Alex

0 Karma

devinbrady
Engager

You can use the foreach command to calculate the percentage for each column iteratively.

In my example, I'm creating a timechart counting different values of my variable view_version, and formatting the results as a percentage in a 100 Percent Stacked column chart.

base_search | timechart count by view_version | addtotals fieldname=_Total | foreach * [eval <<FIELD>> = '<<FIELD>>' * 100 / _Total] | fields - _Total

The fields command removes the _Total field from the final table.

Source: http://answers.splunk.com/answers/169174/percentage-charting-over-time-percentage-of-fieldc.html#ans...

john_q
Explorer

Hi @devinbrady , yes its working as what i need exactly but x axis names are not displaying. example view_version names in your case.

0 Karma

kmcarrol
Path Finder

I'd love to see this answered as well!

0 Karma
Get Updates on the Splunk Community!

Splunk Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...