Dashboards & Visualizations

How to change font colour for a particular table cell?

aru949
Loves-to-Learn Everything

Im able to change the font of a particular row but I want to change the font colour of a particular cell depending on a condition.

I found a way described in https://blog.avotrix.com/change-font-color-of-table-cell-value-in-splunk/ but this involves using JS. Is there any way to do this without using javascript?

Labels (6)
0 Karma

TrangCIC81
Path Finder

If you want to change the font color for a specific table cell without any specific condition, you can use CSS to target that cell and set its color.

For ex:

 

<table>
  <row>
    <th>Header 1</th>
    <th>Header 2</th>
    <th>Header 3</th>
  </row>
  <row>
    <td style="color: red;">Cell 1</td>
    <td>Cell 2</td>
    <td>Cell 3</td>
  </row>
  <row>
    <td>Cell 4</td>
    <td>Cell 5</td>
    <td>Cell 6</td>
  </row>
</table>

 


In this example, the style attribute is used to set the font color of the first cell in the second row to red. You can modify this code to target the specific cell that you want to change the font color for in your table.

What is your current code like? I can have a look on it and adjust.

0 Karma
Get Updates on the Splunk Community!

Splunk Observability Cloud | Customer Survey!

If you use Splunk Observability Cloud, we invite you to share your valuable insights with us through a brief ...

Happy CX Day, Splunk Community!

Happy CX Day, Splunk Community! CX stands for Customer Experience, and today, October 3rd, is CX Day — a ...

.conf23 | Get Your Cybersecurity Defense Analyst Certification in Vegas

We’re excited to announce a new Splunk certification exam being released at .conf23! If you’re going to Las ...