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
Contributor

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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...