Dashboards & Visualizations

Cell Highlighting with cell dependency

VeEn
Explorer

Hey folks,

table cell highlighting with javascript and css, as explained in the dashboard examples, works pretty fine.
But I am trying to build a highlighting for cell values, depending on a second column.

Example:
       test1   test2
row1     1       1   
row2     0       1      

I want to highlight all cells, where test2 has the same value as test1.
I've tried a lot of if loops and none of it seemed to work.
Has anyone found a way?

thanks in advance!

Tags (2)
0 Karma

paramagurukarth
Builder

inside your application.js for your view Splunk.util.getCurrentView() (Splunk.Module.SimpleResultsTable) {
Splunk.Module.SimpleResultsTable = $.klass(Splunk.Module.SimpleResultsTable, {

onResultsRendered: function() {
container.find("tr").each(function(){
if(jQuery(this).childrens[1].innerHTML == jQuery(this).childrens[2].innerHTML )
{
jQuery(this).addClass("highlight")
}else{
jQuery(this).addClass("normal")
}

            });
    }
}

correct some sintax error in this code

0 Karma
Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...