Dashboards & Visualizations

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

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

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

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

Contributor

Thank much Raghav. This worked 🙂

0 Karma

New Member

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

0 Karma

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

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

0 Karma

Motivator

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

Thanks,
Raghav

0 Karma

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

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.

Contributor

Thanks aaraneta , will do the same.

0 Karma

Motivator

Did you try with height option?

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

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