Dashboards & Visualizations

How to color one cell in a table BASED on the value of other cell in xml?

simon21
Path Finder

I have two fileds: Value and Status
Value contains the actual numeric value and Status contains the state (Green,Amber,Red) in textual format.

I need to change the color of value field based on the text of the Status field.
So if value is 2 and Status is Green, the Value should be colored Green.

I cannot use direct color option using the edit(art brush) since the Status field evaluates the state.

Please help.

Thanks

0 Karma

mstjohn_splunk
Splunk Employee
Splunk Employee

hi @simon21,

Did either of the below answers get to the bottom of your question? If so, please resolve this post by approving one of the answers below. If not, keep us updated so that someone else can help solve your problem.

Also, if you're feeling generous, give out an upvote to the user that helped ya. Our users love them upvotes. 🙂

0 Karma

niketn
Legend

@simon21 check out the answer by @kamlesh_vaghela where you can combine the Value and Status in Single Cell Value using SPL (Status field remains separate and untouched). Then use Simple XML JS Extension to apply the cell color based on Value after which you can split and retain only number and discard Status using JavaScript.

https://answers.splunk.com/answers/661894/how-to-color-cell-contents-with-css-and-js.html#answer-661...

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...