Dashboards & Visualizations

How can I set the size of a Single Value Indicator?

dcrooks_us
Explorer

I inherited a dashboard with 4 single value indicators and they increase in size from small up to large. I want to sent them all to be the same size. Thanks!

David L. Crooks

Tags (2)
1 Solution

dcrooks_us
Explorer

Seems this option seems to work:

 <option name="additionalClass">largerSinglevalue</option>

Thanks!

David L. Crooks

View solution in original post

0 Karma

dcrooks_us
Explorer

Seems this option seems to work:

 <option name="additionalClass">largerSinglevalue</option>

Thanks!

David L. Crooks

0 Karma

jeffland
SplunkTrust
SplunkTrust

Be careful though, this option is deprecated.

0 Karma

dcrooks_us
Explorer

Then get me a command that is appreciated and works!

0 Karma

jeffland
SplunkTrust
SplunkTrust

Give your Single Value an id in xml and apply a css file to the dashboard that changes the text size in your single value via id.

0 Karma

chimell
Motivator
0 Karma

dcrooks_us
Explorer

Thanks for the link, but I did not see any solution for setting the height of the Single Value text.

0 Karma

jeffland
SplunkTrust
SplunkTrust

Does your dashboard use any css, or maybe your app? The text size can also be altered with stylesheets.

0 Karma

dcrooks_us
Explorer

The form does use table_cell_highlighting js and css. But, I do not see how that effects the Single Value.

When I inspect the Single Value, I can see that there are must be something setting the height and strange how the 4 values get increasing larger from left to right.

0 Karma

jeffland
SplunkTrust
SplunkTrust

You should be able to pinpoint the exact source for that change when examining the element. If you're using firefox, it says so to the right when you select the "Rules" tab.

0 Karma

nromito_splunk
Splunk Employee
Splunk Employee

Go to your dashboard and click on "Edit Source" in the Edit dropdown. You'll find the following kind of XML for the single value (the tag with single is the start of the single value).

    <dashboard>
      <label>test</label>
      <row>
        <panel>
          <single>
            <title>badfs</title>
            <search>
              <query>index=_internal | head 10 | stats count</query>
              <earliest>0</earliest>
              <latest></latest>
            </search>
            <option name="drilldown">none</option>
            <option name="height">500</option>
          </single>
        </panel>
      </row>
    </dashboard>

Change the option name="height" tag value from whatever number you have there to 115 (this is the default size). This number represents the height in pixels.

dcrooks_us
Explorer

That is not working for me. It seems to be setting the Container size. I have 4 Single Values in a row and set each one to be have the height to 200. When I inspect the Elements with F12, the svg.svg-container 230px x 200px and the text.single-result 12.0469px x 25px, and so on...

I did find if I set the height to 50, that makes the values look closer in size, but there is still differences in sizes.

David L. Crooks

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

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

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...