Dashboards & Visualizations

Table row color depending on a cell value?

erydberg
Splunk Employee
Splunk Employee

I have a SimpleResultsTable in an advanced xml dashboard, and I want the rows in my table to have different colors depending on the value of one of my fields, prec_pass, that has values from 0-1. How do I do that? I tried using rangemap:

... | rangemap field=PREC_PASS lowValue=0-0.99 highValue=1-1 default=highValue

and add a css file to my_app/appserver/static:

/* SimpleResultsTable */
table.simpleResultsTable td.pos,
table.simpleResultsTable th.pos {
    color: #bbb;
    border: none;
}
table.simpleResultsTable td.lowValue {
    border: 1px solid red;
    background-color: #bb2121;

}
table.simpleResultsTable td.highValue {
    border: 1px solid blue;
}

... but that didn't do it, nothing happened. Any suggestions?

Thanks, Elin

Tags (2)
1 Solution

gkanapathy
Splunk Employee
Splunk Employee

This would be a good enhancement request for the table module. Unfortunately it doesn't do it. While the singlevalue module does have the facility to put CSS classes on values, the table modules doesn't. it does have fixed CSS classes for the high-low and heatmap overlays, but they aren't changeable with any out-of-the-box functionality.

Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...