Splunk Search

Color results of pie chart based on a token

andres
Loves-to-Learn Lots

Hi,

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!

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...