Dashboards & Visualizations

How can I change background color in Splunk XML Dashboard table in a panel?

Renunaren
Loves-to-Learn Everything

HI Team,

I am facing an issue in splunk XML Dashboard in a panel table. Below is the snippet of our panel table.

Renunaren_0-1683087026552.png

 

We tried to change the background color of each column of the table to white but we are unable to do it. Even we tried to use the formatting option by selecting the paint icon. But we are unable to change the background color. We request you to kindly suggest us the needful in order to change the background color

Labels (1)
0 Karma

TrangCIC81
Communicator

Let me know what is your current code like so I can write the exact one but you can try something like this.

 

<style>
  .table td:nth-child(1),
  .table th:nth-child(1) {
    background-color: white !important;
  }
  .table td:nth-child(2),
  .table th:nth-child(2) {
    background-color: white !important;
  }
  .table td:nth-child(3),
  .table th:nth-child(3) {
    background-color: white !important;
  }
</style>

 

 

You can add this code right after the <style> tags in your code. Make sure to replace the nth-child() value with the column number you want to target. In the above example, the code is targeting the first 3 columns.

0 Karma

Renunaren
Loves-to-Learn Everything
Thank You Trang it has worked for me.
0 Karma

TrangCIC81
Communicator

Good to hear it works!!

Please mark my answer as the solution so someone can refer it in the future.

Good day!

0 Karma
Get Updates on the Splunk Community!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...