Dashboards & Visualizations

Labels on Dashboard UI

3666142
Path Finder

I have a panel (shown below) and I want to change its color. The panel is called Application Name and I want it to be purple. How do I do that?

In other words, I want "sad-api" to be purple not white.

Splunk Question.png

Labels (3)
0 Karma

elizabethl_splu
Splunk Employee
Splunk Employee

If you're willing to try out Dashboard Studio, this is possible directly in the UI: 

Screen Shot 2021-06-25 at 12.04.02 PM.png

0 Karma

bowesmana
SplunkTrust
SplunkTrust

@3666142 

See this example dashboard

<dashboard theme="dark">
  <label>SadApi</label>
  <row depends="$showformat$">
    <panel>
      <html>
        <style>
          #app_name g.svg-label text {
            fill:#6a0dad !important;
          }
          #environment g.svg-label text {
            fill:#6a0dad !important;
          }
        </style>
      </html>
    </panel>
  </row>
  <row>
    <panel id="app_name">
      <single>
        <title>Application Name</title>
        <search>
          <query>| makeresults
| eval "Application Name"="SadApi"</query>
          <earliest>-4h@m</earliest>
          <latest>now</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="colorBy">value</option>
        <option name="colorMode">none</option>
        <option name="drilldown">none</option>
        <option name="height">114</option>
        <option name="numberPrecision">0</option>
        <option name="rangeColors">["0x53a051","0x0877a6","0xf8be34","0xf1813f","0xdc4e41"]</option>
        <option name="rangeValues">[0,30,70,100]</option>
        <option name="showSparkline">1</option>
        <option name="showTrendIndicator">1</option>
        <option name="trellis.enabled">0</option>
        <option name="trellis.scales.shared">1</option>
        <option name="trellis.size">medium</option>
        <option name="trendColorInterpretation">standard</option>
        <option name="trendDisplayMode">absolute</option>
        <option name="unitPosition">after</option>
        <option name="useColors">0</option>
        <option name="useThousandSeparators">1</option>
      </single>
    </panel>
    <panel id="environment">
      <single>
        <title>Application Name</title>
        <search>
          <query>| makeresults
| eval "Environment"="Release"</query>
          <earliest>-4h@m</earliest>
          <latest>now</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="colorBy">value</option>
        <option name="colorMode">none</option>
        <option name="drilldown">none</option>
        <option name="height">114</option>
        <option name="numberPrecision">0</option>
        <option name="rangeColors">["0x53a051","0x0877a6","0xf8be34","0xf1813f","0xdc4e41"]</option>
        <option name="rangeValues">[0,30,70,100]</option>
        <option name="showSparkline">1</option>
        <option name="showTrendIndicator">1</option>
        <option name="trellis.enabled">0</option>
        <option name="trellis.scales.shared">1</option>
        <option name="trellis.size">medium</option>
        <option name="trendColorInterpretation">standard</option>
        <option name="trendDisplayMode">absolute</option>
        <option name="unitPosition">after</option>
        <option name="useColors">0</option>
        <option name="useThousandSeparators">1</option>
      </single>
    </panel>
  </row>
</dashboard>

By setting <panel id="X"> and defining a hidden row with some embedded CSS, the change is effected by the CSS

#app_name g.svg-label text {
  fill:#6a0dad !important;
}

where the #app_name line identifies your panel identifier and then set the appropriate colour code in the fill statement.

This is a common technique for playing around with Splunk dashboard styling - what you can do comes down to your skills with CSS

Hope this helps

 

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Index This | What travels the world but is also stuck in place?

April 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...