Splunk Search

how to change the color of a table cell depending on the numerical value row wise

9738078959
Engager

KPI | Week1 | Week2 | Week3 | Week4 |
Aging | 42 | 48 | 50 | 60 |
SLA | 0 | 3 | 7 | 2 |

I would like to assign a rule as below
1. "Aging" row to change the colour of a single cell which is below 50 to Green and if it is above 50 to Red.

  1. "SLA" row to change the color of a single cell which is below and equal to 2 to Green and if it is equal to 3 to Amber and if it is greater than 3 to be Red
Tags (1)
0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

Hi @9738078959,

You can use custom cell renderer in javascript for your dashboard.

Please check below link for more information.

http://dev.splunk.com/view/webframework-developapps/SP-CAAAEUB

Check below link for example reference.

http://dev.splunk.com/view/webframework-codeexamples/SP-CAAAEVM

Find below code in the link and do appropriate changes as per your logic.

// Use the BaseCellRenderer class to create a custom table cell renderer
            var CustomCellRenderer = TableView.BaseCellRenderer.extend({ 
              .
              .
              .
              .
              .
            });

Let me know for further assistance.

Thanks
Kamlesh

0 Karma

skoelpin
SplunkTrust
SplunkTrust
0 Karma

9738078959
Engager

I have two rows in a table and both have two different conditions
For Aging--> below 50 to Green and if it is above 50 to Red.
for SLA --> less than or equal to 2 to Green and if it is equal to 3 to Amber and if it is greater than 3 to be Red

i should change the color of cell based on condition...please help!!

0 Karma

ddrillic
Ultra Champion

It's interesting to see the lovely Format/Color feature only for the Single Value chart -

alt text

0 Karma
Get Updates on the Splunk Community!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...