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
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, ...