Splunk IT Service Intelligence

How to change font color in dashboard table?

logankinman99
Path Finder

Hi, I'm looking to change the font of a statistics table within my dashboard.
It defaults at white, but when you edit the drilldown to allow clicks, it defaults to blue and is much harder to read at a distance.

Is there any way you know of to change this back?

(Notes: I tried charting.fontColor, but it is not compatible with stats tables apparently. Also I am using Splunk Cloud and do not have direct access to config/css files)

Labels (1)

Taruchit
Explorer

Hi All,

I need your assistance similar to the topic of this thread. 

I have a table which has two columns: - Color and Description

I created the table with following SPL: -

<row>
	<panel>
		<table>
			<search>
				<query>
| makeresults
|eval Color="0", Description="Color = 0"
|append
[| makeresults
eval Legend=""
|eval Color="-1", Description="Color = -1"]| append
[| makeresults |
eval Color="1", Description="Color = 1"] | table Color, Description | sort Color
</query>
			</search>
			<format type="color" field="Color">
				<colorPalette type="map">{"0":#4FA484,"-1":#AF575A,"1":#006D9C}</colorPalette>
			</format>
		</table>
	</panel>
</row>

It gives a table with two columns, the first column has color in each cell based on the value. 

I need to make text color same as the respective background color so that text can be hidden. Thus, need your guidance related to it.

table.png

Thank you

0 Karma

arjunpkishore5
Motivator

You can add css within your dashboard without the need for installing css or javascript files. Add this to the SimpleXML

  <row>
    <panel depends="$hidden$">
      <html>
        <style>
          table th td {
  color:#4f34eb;
}
          table tr td {
  color:#fc0303;
}

table.table-drilldown tr td {
color:#000000;
}

        </style>
      </html>
    </panel>
    </row>

Change the values of color to whatever you want.
table th td This section is for the table headers
table tr td This section is for the table rows
table.table-drilldown tr td This section is for the table rows when you have a drilldown

You don't need to use all 3. Use whichever you want to modify

hope this helps

esnyder_splunk
Splunk Employee
Splunk Employee

Do you mean a glass table? Or a separate dashboard within ITSI? Also what version?

0 Karma
Get Updates on the Splunk Community!

Improve Your Security Posture

Watch NowImprove Your Security PostureCustomers are at the center of everything we do at Splunk and security ...

Maximize the Value from Microsoft Defender with Splunk

 Watch NowJoin Splunk and Sens Consulting for this Security Edition Tech TalkWho should attend:  Security ...

This Week's Community Digest - Splunk Community Happenings [6.27.22]

Get the latest news and updates from the Splunk Community here! News From Splunk Answers ✍️ Splunk Answers is ...