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
Get Updates on the Splunk Community!

Earn a $35 Gift Card for Answering our Splunk Admins & App Developer Survey

Survey for Splunk Admins and App Developers is open now! | Earn a $35 gift card!      Hello there,  Splunk ...

Continuing Innovation & New Integrations Unlock Full Stack Observability For Your ...

You’ve probably heard the latest about AppDynamics joining the Splunk Observability portfolio, deepening our ...

Monitoring Amazon Elastic Kubernetes Service (EKS)

As we’ve seen, integrating Kubernetes environments with Splunk Observability Cloud is a quick and easy way to ...