Dashboards & Visualizations

How to change the font color on a condition

radha116
Explorer

created a query with data  in table as Name , app_status, Job_status. Both app_status and job_status has Success and Failed statuses as per conditional. What to change text color to red for failed and green for Success, I tried couple the format text changes the background color instead text color.

Thank you

 

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

There are a couple of tricks you can do with CSS (no JS required) which can be embedded into the SimpleXML of the dashboard (not requiring separate files).

See this response for an idea - if you need more explanation, please ask

https://community.splunk.com/t5/Splunk-Search/How-to-add-a-color-to-the-field-in-one-column-based-on...

 

0 Karma

venkatasri
SplunkTrust
SplunkTrust

Hi @radha116 

Yes it does change background color, you need to write custom JS  as described to achieve text color change refer - https://blog.avotrix.com/change-font-color-of-table-cell-value-in-splunk/

---

An upvote would be appreciated and Accept solution if it helps!

0 Karma
Get Updates on the Splunk Community!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk, and empower your SOC to reach new heights! Duration: 1 hour  Prepare to ...

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...