Dashboards & Visualizations

Set color in table header with dashboard

eholz1
Builder

Hello All,

Thanks for the help this forum provides.

I have a table in dashboard studio. I can set the backgrould color for the header.

I would like to be able to change the color of the text in the table header without using the dark mode which

sets text color in the header to white (and the table rows too). I would like to have the text color in my 

header to be white (or some other color) when the dashboard is set to the "light mode".

It there a way to do this?

Thanks,

Eholz1

Labels (2)
0 Karma
1 Solution

livehybrid
SplunkTrust
SplunkTrust

Hi @eholz1 

You can achieve this by setting the following options in your table definition:

options={{
            tableFormat: {
                headerBackgroundColor: 'blue',
                headerColor: 'white',
            },
        }}

for more examples check out https://splunkui.splunk.com/Packages/visualizations/Table

 

 

🌟 Did this answer help you? If so, please consider:

    • Adding karma to show it was useful
    • Marking it as the solution if it resolved your issue
    • Commenting if you need any clarification

Your feedback encourages the volunteers in this community to continue contributing.

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust

You can use hex colors in your table format option

            "options": {
                "tableFormat": {
                    "headerBackgroundColor": "#0000ff",
                    "headerColor": "#ffffff"
                }
            },

livehybrid
SplunkTrust
SplunkTrust

Hi @eholz1 

You can achieve this by setting the following options in your table definition:

options={{
            tableFormat: {
                headerBackgroundColor: 'blue',
                headerColor: 'white',
            },
        }}

for more examples check out https://splunkui.splunk.com/Packages/visualizations/Table

 

 

🌟 Did this answer help you? If so, please consider:

    • Adding karma to show it was useful
    • Marking it as the solution if it resolved your issue
    • Commenting if you need any clarification

Your feedback encourages the volunteers in this community to continue contributing.

eholz1
Builder

To all that responded to my post, "Thank you So Much"

It has been a while since I have looked into using Dashboard Studio (like 3+ years!) and the

solutions posted here are excellent and very helpful to me.

 

Thanks Again,

eholz1 - a little smarter now!

0 Karma

tej57
Builder

Hey @eholz1,

I came across a previous community answer to get the theme of the dashboard on the basis of token - https://community.splunk.com/t5/Dashboards-Visualizations/Is-there-a-simple-way-to-get-the-current-d....

Once the background REST call is made, you can define conditional token for your table panel to set the color based on the theme_tok value.

Thanks,
Tejas.

 

---
If the above solution is helpful, an upvote is appreciated..!! 

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...