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!

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...

Cloud Monitoring Console - Unlocking Greater Visibility in SVC Usage Reporting

For Splunk Cloud customers, understanding and optimizing Splunk Virtual Compute (SVC) usage and resource ...

Automatic Discovery Part 3: Practical Use Cases

If you’ve enabled Automatic Discovery in your install of the Splunk Distribution of the OpenTelemetry ...