Dashboards & Visualizations

Single Value Button Question

Ant1D
Motivator

Hey,

With single value buttons, I know that you can have red, green and amber colours as standard.

How would I be able to define my own colours (purple, orange etc) for this object? E.g. I want the colour of my single value button to turn purple when a certain value range is reached.

Thanks in advance for your help

1 Solution

ziegfried
Influencer

You need to define a CSS class for this. Best way to do this is to create a application.css file in the app of your dashboard.

$SPLUNK_HOME/etc/apps/<APP>/appserver/static/application.css

Here are some sample CSS rules:

.SingleValue .purple { background-color: purple; color: white; }
.SingleValue .darkred { background-color: #CC0000; color: #FFFFFF; }

These same rules define 2 classes (purple and darkred) that can be used to color the single value element.

View solution in original post

ziegfried
Influencer

You need to define a CSS class for this. Best way to do this is to create a application.css file in the app of your dashboard.

$SPLUNK_HOME/etc/apps/<APP>/appserver/static/application.css

Here are some sample CSS rules:

.SingleValue .purple { background-color: purple; color: white; }
.SingleValue .darkred { background-color: #CC0000; color: #FFFFFF; }

These same rules define 2 classes (purple and darkred) that can be used to color the single value element.

Ant1D
Motivator

Thanks again Ziegfried

Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

December 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...