Dashboards & Visualizations

Increasing a size of a Rangemap Value

abhayneilam
Contributor

Hi,

I have a splunk query which is finding out a count using rangemap command in splunk which has been charted as a Single Value in my dashboard . Now it was earlier in basic xml but not I have converted it in HTML. I want to change the single value to be shown bigger ( basically want to change the size of a single value ). Please help !!

Thanks in Advance !!

0 Karma

aholzer
Motivator

You have to do that with .css.

Create a .css under $SPLUNK_HOME/etc/apps//appserver/static/.css. The .css should contain something like the following:

.single-value .single-result {
    font-size: 38px !important;
}

And finally make a reference to your css from the dashboard:

<dashboard stylesheet="<your_css>.css">

Hope this helps

0 Karma

abhayneilam
Contributor

But, I have converted it into HTML code and now the code becomes clumsy .

<div class="dashboard-header clearfix">
  <h2>MMM_NNN</h2>
</div>
<div class="dashboard-row dashboard-row1">
    <div class="dashboard-cell" style="width: 20%;">
        <div class="dashboard-panel clearfix">                
            <div class="panel-element-row">

                <div class="dashboard-element single" id="element1" style="width: 100%;border: 2px solid darkblue">
                    <div class="panel-head">
                        <h1 ALIGN="CENTER">YY</h1>
                    </div>
                    <div class="panel-body"></div>
                </div>
            </div>
        </div>
    </div>
    <div class="dashboard-cell" style="width: 20%;">
        <div class="dashboard-panel clearfix">                
            <div class="panel-element-row">

                <div class="dashboard-element single" id="element2" style="width: 100%;border: 2px solid darkblue">
                    <div class="panel-head">
                        <h1 ALIGN="CENTER">XX</h1>
                    </div>
                    <div class="panel-body"></div>
                </div>
            </div>
        </div>

the code is very big, I have just given you the snippet. For the

XX and YY , there is a single value coming, I want to increase the font size for these

0 Karma

aholzer
Motivator

Have you tried css like this?

h1 {
    font-size: 38px !important;
}
0 Karma

abhayneilam
Contributor

Where should I write this ? in the same HTML code

0 Karma

aholzer
Motivator

No, in the css. I think you can embed css in html, but I'm not sure how.

Just FYI - the first time you ever make a css you'll have to restart your search head to pick it up, but henceforth you'll just need to refresh the dashboard. If you embed the css you won't need to restart the server.

0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...