Dashboards & Visualizations

Change the font size of Single value panel title tag in Simple XML

karthi25
Path Finder

I am having four single value panel in a same row on the XML dashboard.I have used the below code to reduce the font size

#id .single-value .single-result {
      font-size: 25px !important;
  }

Its reduces the font size of the result as expected.
Now I want to reduce only the title font size some more.Can anyone please suggest me to do it.

Tags (1)
0 Karma
1 Solution

niketn
Legend

@karthi25, you can add the following CSS

      #id .dashboard-element-title{
        font-size: 90% !important;
      }

Following is run anywhere dashboard to test the changes:

<dashboard>
  <label>Change Single Value Title Size</label>
  <row>
    <panel>
      <html>
        <style>
          #id .dashboard-element-title{
            font-size: 90% !important;
          }
          #id .single-value .single-result {
            font-size: 25px !important;
          }
        </style>
      </html>
      <single id="id">
        <title>Single Value Title</title>
        <search>
          <query>| makeresults
| eval data = 1023
| table data</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="showTrendIndicator">0</option>
      </single>
    </panel>
  </row>
</dashboard>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

niketn
Legend

@karthi25, you can add the following CSS

      #id .dashboard-element-title{
        font-size: 90% !important;
      }

Following is run anywhere dashboard to test the changes:

<dashboard>
  <label>Change Single Value Title Size</label>
  <row>
    <panel>
      <html>
        <style>
          #id .dashboard-element-title{
            font-size: 90% !important;
          }
          #id .single-value .single-result {
            font-size: 25px !important;
          }
        </style>
      </html>
      <single id="id">
        <title>Single Value Title</title>
        <search>
          <query>| makeresults
| eval data = 1023
| table data</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="showTrendIndicator">0</option>
      </single>
    </panel>
  </row>
</dashboard>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...