Dashboards & Visualizations

In a dashboard, can we change background color for the Splunk input choices ?

VI371887
Path Finder

I have a dashboard where panels hide/show according to the linked list choices you are making,

Now, i want the choices to have a specific color change and font color. So, when i am trying to use a certain background color, all of the linked list would that background color.

 <panel>
    <html>
     <style>
       #link  {         
             color: black !important;
             font-weight: bold !important;
             background: #e3e7ea !important;


 }
         </style>    </html>     </panel> 
0 Karma

kumaranv
Path Finder

Perfect. It works. Thanks

<row>
<panel depends="$hide$">
<html>
<style>

#list button{
color: blue;
background: $background_color_token$;
}

</style>
</html>
</panel>
<panel id="list">
<input type="link" token="field1">
<label>field1</label>
<choice value="1">One</choice>
<choice value="2">Two</choice>
<choice value="3">Three</choice>
<default>1</default>
<change>
<condition value="1">
<set token="background_color_token">blue</set>
</condition>
<condition value="2">
<set token="background_color_token">green</set>
</condition>
<condition value="3">
<set token="background_color_token">red</set>
</condition>

</change>
</input>
</panel>
</row>

0 Karma

payl_chdhry
Explorer

@VI371887 know this is very old post, but were you ever successful in doing this?

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

You can use tokens in the CSS.

background-color: $background_color_token$ |important;

 Set the token elsewhere in the dashboard.

0 Karma

kumaranv
Path Finder

Could you please provide an example of passing token into CSS attributes. Thanks

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

That is an example of a token being used in CSS. The token needs to be set to a value elsewhere in the dashboard.

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...