Dashboards & Visualizations

how to change the color code and font size for single value and it's labels in Splunk6

cyue_splunk
Splunk Employee
Splunk Employee

I saw some post before to customize the color/font size for single value (range map), but it seems it doesn't work well in Splunk6. It seems there is a file called single-value.css controls the color code/font size of the single values and the labels, some codes like:

.single-value .under-label{text-transform:uppercase;color:#999999;font-size:11px;}
.single-value .severe,.single-value.severe .single-result{color:#d85d3c;}

but when I tried to defined my own color code and font size in a customized css stylesheet or in application.css, it didn't take effect and cannot override the default settings. Any idea how to achieve that? For example, I want to change the under label color to #000000 and change the color for severe range to #ff0000.

1 Solution

chanst2
Path Finder

You can create a dashboard.css under etc/apps//appserver/static
put the following codes in dashboard.css which will create a new range highCustom

.single-value.highCustom{
   color: #FFFFFF;

}

Then you can use rangemap in a search and define a range for highCustom, then if the value falls into this highCustom range, the color of the value will become white.

View solution in original post

chanst2
Path Finder

You can create a dashboard.css under etc/apps//appserver/static
put the following codes in dashboard.css which will create a new range highCustom

.single-value.highCustom{
   color: #FFFFFF;

}

Then you can use rangemap in a search and define a range for highCustom, then if the value falls into this highCustom range, the color of the value will become white.

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...