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!

Splunk Observability Cloud's AI Assistant in Action Series: Auditing Compliance and ...

This is the third post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

What You Read The Most: Splunk Lantern’s Most Popular Articles!

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...