Dashboards & Visualizations

Single Value Visualization - Set value to always have that color

cooperjaram
Engager

Hello,

I have a single value visualization with four values and I would like to set each value to have one color and to stay that color. For example I have a CRIT, HIGH, MED, LOW. I would like the CRIT to always be red, for HIGH to always be orange, for MED to always to be blue, and LOW always to be green. Is there a way to do this? I have tried a couple of options from browsing the forums but no luck.

Thanks

0 Karma
1 Solution

niketn
Legend

@cooperjaram you have several options to do this:

1) Use single value with rangemap (Not recommended as any edit to Single Value from UI will override this). Refer to one of my older answers: https://answers.splunk.com/answers/569541/single-value-in-advanced-xml-color-and-result.html

2) Use Status Indicator Custom Visualization: You can add color as well as icon based on text. Refer to an older answer with option 1 and option 2 both: https://answers.splunk.com/answers/595910/how-to-build-a-dashboard-with-single-panel-value-b.htm

3) Use Simple XML JS extension to override Single Value color on render (you would need to know JavaScript to handle text values). Refer to one of the older answers which is based on numeric value but can be changed as per text as well. https://answers.splunk.com/answers/659702/how-to-configure-single-value-dashboard-color-base.html

4) Use <html> panel with CSS override based on text value in search result. Refer to older answer: https://answers.splunk.com/answers/675789/how-to-change-the-font-color-in-a-dashboard-depend.html

5) Use table with single result and apply color using UI. Use CSS override to hide table header and further style table cell as per need. One of the older answers to hide table header: https://answers.splunk.com/answers/587679/how-do-i-hide-table-headers.html

Please try out and confirm if any of the options work for you!

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

niketn
Legend

@cooperjaram you have several options to do this:

1) Use single value with rangemap (Not recommended as any edit to Single Value from UI will override this). Refer to one of my older answers: https://answers.splunk.com/answers/569541/single-value-in-advanced-xml-color-and-result.html

2) Use Status Indicator Custom Visualization: You can add color as well as icon based on text. Refer to an older answer with option 1 and option 2 both: https://answers.splunk.com/answers/595910/how-to-build-a-dashboard-with-single-panel-value-b.htm

3) Use Simple XML JS extension to override Single Value color on render (you would need to know JavaScript to handle text values). Refer to one of the older answers which is based on numeric value but can be changed as per text as well. https://answers.splunk.com/answers/659702/how-to-configure-single-value-dashboard-color-base.html

4) Use <html> panel with CSS override based on text value in search result. Refer to older answer: https://answers.splunk.com/answers/675789/how-to-change-the-font-color-in-a-dashboard-depend.html

5) Use table with single result and apply color using UI. Use CSS override to hide table header and further style table cell as per need. One of the older answers to hide table header: https://answers.splunk.com/answers/587679/how-do-i-hide-table-headers.html

Please try out and confirm if any of the options work for you!

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

nareshinsvu
Builder

Were you able to generate non-numeric Single value dashboards?

Single value is only numeric as per the doc and the examples shown. Could you share your code snippet and explain what you are trying to achieve?

https://docs.splunk.com/Documentation/Splunk/7.3.1/Viz/SingleValueGenerate

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Observability Simplified: Combining User Experience, Application Performance & ...

Tech Talk Observability Simplified: Combining User Experience, Application Performance & Network ...

Event Series May & June: From Network Visibility to Service Intelligence

Unifying the Network: Moving from Alert Noise to Service Intelligence with Splunk ITSI In today’s hybrid ...

Global Splunk User Group Events: May + June 2026

Your Splunk Community Awaits: Discover Upcoming User Group Events Worldwide    Staying ahead in the fast-paced ...