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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...