Dashboards & Visualizations

If color - single value

mansel_scheffel
Explorer

Hi,

I have a form that has several single value visuals on them populated by a lookup(not numbers).. I have created dropdown menus that im hoping i can use to influence/change the colors..

So basically the default block colour must always be red, but then I want to change it to any of the 3 other colours in the range via the dropdown box.

I was thinking along the lines of using a token from the dropdown which would represent a number and insert that into an eval statement with rangemap etc.. No idea how to write it out basically.. Any thoughts ?

Thanks!

0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

use eval and case in your search to set a value to every status you want to represent and use this value to set the color:
e.g. | eval range=case(field=Rome,1,field=Parigi,2,field=London,3....).
After you are able to not show this value using the field tag.
See how to do this in the dashboard example "Table Element with Hidden Fields".
Bye.
Giuseppe

View solution in original post

0 Karma

gcusello
SplunkTrust
SplunkTrust

use eval and case in your search to set a value to every status you want to represent and use this value to set the color:
e.g. | eval range=case(field=Rome,1,field=Parigi,2,field=London,3....).
After you are able to not show this value using the field tag.
See how to do this in the dashboard example "Table Element with Hidden Fields".
Bye.
Giuseppe

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...