Dashboards & Visualizations

aligning single value output.

smolcj
Builder

hi all,
i am using several single value results in my dashboard and i am using the tags.
the code sample is like this and repeated several times.




blabla

ServerName:

so my output is like

labe1:value
labelllll2:value2
la:value3
how to align it like
label : value1
labelllll2 : value2
la : value3
please help..
thankyou

Tags (1)
0 Karma
1 Solution

jonuwz
Influencer

Not easily with CSS, and since its unlikely the font you'll be using is monospaced, it wont be easy to correct the spacing with padding.

This CSS :

.singleLabel {
    display: inline-block;
    min-width: 80px;
    text-align: right;
}
.singleResult {
    display: inline-block;
    min-width: 80px;
    text-align: left;
}

should line up your data ( you might have to play with the widths )

but it'll look like this :

         label : value1
    labelllll2 : value2
            la : value3

How to apply custom CSS

View solution in original post

jonuwz
Influencer

Not easily with CSS, and since its unlikely the font you'll be using is monospaced, it wont be easy to correct the spacing with padding.

This CSS :

.singleLabel {
    display: inline-block;
    min-width: 80px;
    text-align: right;
}
.singleResult {
    display: inline-block;
    min-width: 80px;
    text-align: left;
}

should line up your data ( you might have to play with the widths )

but it'll look like this :

         label : value1
    labelllll2 : value2
            la : value3

How to apply custom CSS

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