Dashboards & Visualizations

How to set a row in certain color if the row is listed with value?

Jouman
Path Finder

Hi all,

There is a panel contain a table as below.

I would like to color Scenario_1  fields in red because the both Success or Failure field in this row contains values = 0. 
Is there any way to implement such functionality ?

Event nameSuccessFailure
Scenario_100
Scenario_243
Scenario_301

 

Thank you very much.

Labels (2)
0 Karma

VatsalJagani
SplunkTrust
SplunkTrust

@Jouman - I don't have example ready-made but here is the guide to solve this.

  1. Use below command in your search to update the value of "Event Name"
    1. | eval "Event Name"=if(Success+Failure==0, "Y-", "N-")+'Event Name'
    2. This will append "Y" or "N" depending on if we need to do red color or not.
  2. Then use Custom Cell Renderer on "Event Name" column to do the following things:
    1. Color the text with Red if it is starting with "Y-"
    2. Do substr (sub string) and remove first two character from the value (Y- and N-) to make it back to actual value.
  3. Reference for custom cell renderer in JS
    1. https://community.splunk.com/t5/Splunk-Search/Change-the-color-of-rows-in-a-table-based-on-text-valu...
    2. https://dev.splunk.com/enterprise/docs/developapps/visualizedata/simplexmlextensions/tableswithcusto...
    3. There are many other examples available on Splunk answers

 

I hope this helps!!! Upvote is appreciated!!! Accept the answer if you find it useful!!

0 Karma
Get Updates on the Splunk Community!

Say goodbye to manually analyzing phishing and malware threats with Splunk Attack ...

In today’s evolving threat landscape, we understand you’re constantly bombarded with phishing and malware ...

AppDynamics is now part of Splunk Ideas

Hello Splunkers, We have exciting news for you! AppDynamics has been added to the Splunk Ideas Portal. Which ...

Advanced Splunk Data Management Strategies

Join us on Wednesday, May 14, 2025, at 11 AM PDT / 2 PM EDT for an exclusive Tech Talk that delves into ...