Splunk Search

Color results of pie chart based on a token

Loves-to-Learn Lots


My search returns a pie chart that is a sum of a variable (memory_usage_GB) and ploted by another variable (user).


| stats sum(memory_usage_GB) by user


On the other side, I have an input in the same dashboard where you can select a specific user. The input is referenced with the token $userfilter$.

I want the pie chart to color the result corresponding to the selected user in the input with one color, and all the other results with another color.

So in the XML of the pie chart, I have tried the following:

<option name="charting.fieldColors">{"$userfilter$": 0x39ff14,"all":0xa9a9a9}</option>

It colors the desired user. However,  I don't know how can I refer to the rest of the results.

Maybe there is another way to do the coloring in the search string?

Thank you!

Labels (1)
0 Karma
Get Updates on the Splunk Community!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

 (view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...