Dashboards & Visualizations

How do I edit a dashboard so that each panel has a different color?

chrisschum
Path Finder

I've tried the property but it still shows the color across all panels (I assume this is because of the h2 property set).

Also, what are the dashboard-panel options, i.e. h2, h3, etc?

Below is an example.

Thanks!

.dashboard-panel h2{
             background:#3366ff !important;
             color:white !important;
             text-align: center !important;
             font-weight: bold !important;
             border-top-right-radius: 15px;
             border-top-left-radius: 15px;
1 Solution

vnravikumar
Champion

Hi

Try like

<dashboard>
  <label>panel</label>
  <row>
    <panel id="firstpanel">
      <title>test1</title>
      <table>
        <search>
          <query>index="_internal" |stats count by source</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
      </table>
    </panel>
  </row>
  <row>
    <panel id="secondpanel">
      <title>test2</title>
      <table>
        <search>
          <query>index="_internal" |stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
      </table>
    </panel>
  </row>
  <row depends="$hide$">
    <html>
      <style>
        #secondpanel .dashboard-panel h2{
background:#3366ff !important;
color:white !important;
text-align: center !important;
font-weight: bold !important;
border-top-right-radius: 15px;
border-top-left-radius: 15px;
}

 #firstpanel .dashboard-panel h2{
background:#81ff33 !important;
color:white !important;
text-align: center !important;
font-weight: bold !important;
border-top-right-radius: 15px;
border-top-left-radius: 15px;
}
      </style>
    </html>
  </row>
</dashboard>

View solution in original post

vnravikumar
Champion

Hi

Try like

<dashboard>
  <label>panel</label>
  <row>
    <panel id="firstpanel">
      <title>test1</title>
      <table>
        <search>
          <query>index="_internal" |stats count by source</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
      </table>
    </panel>
  </row>
  <row>
    <panel id="secondpanel">
      <title>test2</title>
      <table>
        <search>
          <query>index="_internal" |stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
      </table>
    </panel>
  </row>
  <row depends="$hide$">
    <html>
      <style>
        #secondpanel .dashboard-panel h2{
background:#3366ff !important;
color:white !important;
text-align: center !important;
font-weight: bold !important;
border-top-right-radius: 15px;
border-top-left-radius: 15px;
}

 #firstpanel .dashboard-panel h2{
background:#81ff33 !important;
color:white !important;
text-align: center !important;
font-weight: bold !important;
border-top-right-radius: 15px;
border-top-left-radius: 15px;
}
      </style>
    </html>
  </row>
</dashboard>

chrisschum
Path Finder

That worked like a champ! Thank you!!!

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...