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
*NEW* Splunk Love Promo!
Snag a $25 Visa Gift Card for Giving Your Review!

It's another Splunk Love Special! For a limited time, you can review one of our select Splunk products through Gartner Peer Insights and receive a $25 Visa gift card!


Or Learn More in Our Blog >>