Dashboards & Visualizations

How to change the font size for single value visualizations in 6.4.1?

hemendralodhi
Contributor

Hello Team,

I am trying to change the font size of several single value visualizations and tried various methods mentioned in this forum but none are working. I created my.css file in appserver/static directory and referred in the dashboard as .

Tried various options for my.css file but none is taking into effect: Cleared browser cache too and _bump the server cache. Tried embedding html tag with custom font inside form too.

<#.single-value .single-result {font-size:15px; }>
#span.singleResult { font-size: 10px; }
#.single-result { font-size: 5px; }
#.custom-result-value {
    font-size: 5px;
    text-align: center;
}
#.SingleValue .singleResult { margin: 0px; font-size: 5px; }

Please advise.

Thanks
Hemendra

0 Karma
1 Solution

Raghav2384
Motivator

Hey @hemendralodhi,

Not sure if you are still looking for an answer, try to embedding the !important after the css element. I have inline css doing the same which can easily be wrapped in a css file.

Syntax:

 <row>
    <panel>
      <html>
        <style type="text/css">
          .dashboard-panel .panel-body.html {
    padding: 10px 10px;
    background-color: #120660;
}
          .single-value .single-result {
     font-size: 20px !important;
 }
     </style>
    </html>
    </panel>
    </row>

Hope this helps!

Thanks,
Raghav

View solution in original post

Raghav2384
Motivator

Hey @hemendralodhi,

Not sure if you are still looking for an answer, try to embedding the !important after the css element. I have inline css doing the same which can easily be wrapped in a css file.

Syntax:

 <row>
    <panel>
      <html>
        <style type="text/css">
          .dashboard-panel .panel-body.html {
    padding: 10px 10px;
    background-color: #120660;
}
          .single-value .single-result {
     font-size: 20px !important;
 }
     </style>
    </html>
    </panel>
    </row>

Hope this helps!

Thanks,
Raghav

hemendralodhi
Contributor

Thank much Raghav. This worked 🙂

sanjayguptag
New Member

Hey Raghav - It works for main result, how I can change style for underlabel for single value visualization?

0 Karma

avocadopratha
New Member

Can you please elaborate this solution. I too have to keep consistent font size for all single valued elements in my dashboards panel.

0 Karma

yassineramadan
Engager

Thank you so much Raghav, that was a great answer.

0 Karma

Raghav2384
Motivator

Excellent! Please accept this as an answer so that it can easily be found.

Thanks,
Raghav

0 Karma

hemendralodhi
Contributor

Any help guys? I am still struggling to make it work. Tried various options from Forum as listed above.

Splunk v6.4.1

Thanks

0 Karma

aaraneta_splunk
Splunk Employee
Splunk Employee

Hi @hemendralodhi - If you want to try to get some immediate help for your question, (if you haven't already done so) you should join the 1300+ Splunk users in our public Slack chat. People ask each other for immediate help on there daily. You can share your question/link to your post there to see if anyone can take a stab at it.

You first have to request access through www.splunk402.com/chat. Fill out the form, and once you receive the approval email, you can access Slack through Slack.com and ask for help in the #general channel.

hemendralodhi
Contributor

Thanks aaraneta , will do the same.

0 Karma

hardikJsheth
Motivator

Did you try with height option?

 <option name="height">100</option>
0 Karma

hemendralodhi
Contributor

Thanks hardik for the response. I tried height option and it reduces the panel height to some extent and look better than before. But still trying to find out how to reduce the font.

Thanks for your help.

0 Karma
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 ...