Dashboards & Visualizations

How to set the size of the Single Value Panel title uniform throughout the dashboard?

kumargaurav
New Member

I have a dashboard having a number of Single value Panels but having a different title with different size(I mean the number of letters in the title).Due to which alignment of Panel in the dashboard doesn't look good. I want to make it uniform.
Source Code:

<panel>
  <single>
    <title>15-TBB Ordersssssssssssssssssssfgfhgfhfghfghfghfghfghfghfghfghfghfghfghfghfghfsssssssssssssssssssssssssssssss</title>
    <search>
      <query>index=xyz "Prospect Management data capture eligibility for request uri: '/build-your-bundle/ajax/captureprospectdetailscompleteorder', method: 'GET', eligibility: 'true'" | dedup _time,host,source,_raw | stats count</query>
      <earliest>-1d@d</earliest>
      <latest>@d</latest>
    </search>
    <option name="colorMode">block</option>
    <option name="drilldown">none</option>
    <option name="linkView">search</option>
    <option name="useColors">1</option>
  </single>
</panel>
0 Karma
1 Solution

niketn
Legend

@kumargaurav, following are the two option you can try,

1) Add to Single value Caption using Format Visualization option which adds Simple XML Configuration like the following:

<option name="underLabel">Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890</option>

This will move all the Title below single value. This can accommodate for longer text in single line as compared to title but will truncate before and/or after since it is always single line.
2) Create a dummy row with same count of panels as Single Value Panels and use only for <title>
Please refer to screenshot below. First row is one with issue. Second is the option with Caption and Third row is solution with separate dummy row with empty panels having <title>

alt text

Following is the Simple XML code:

<dashboard>
  <label>Single Value Alignment</label>
  <row>
    <panel>
      <title>Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890</title>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=INFO
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
    </panel>
    <panel>
      <title>Abcdefghijkl</title>      
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=ERROR
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
    </panel>
    <panel>
      <title>Abcdefghijklmnopqrstuvwxyz1234567890</title>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=WARN
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="rangeValues">[0,200,500,1000]</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
    </panel>
    <panel>
      <title>Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz123</title>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by component
| table count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
    </panel>
    <panel>
      <title>Abcdefghijklmnopqr1234567890</title>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by date_mday</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
    </panel>
    <panel>
      <title>Abcdefghijklm87239473no 128138213682732</title>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by date_hour</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
    </panel>
  </row>
  <row>
    <panel>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=INFO
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="underLabel">Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=ERROR
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="underLabel">Abcdefghijkl</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=WARN
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="rangeValues">[0,200,500,1000]</option>
        <option name="refresh.display">progressbar</option>
        <option name="underLabel">Abcdefghijklmnopqrstuvwxyz1234567890</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by component
| table count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="underLabel">Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz123</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by date_mday</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="underLabel">Abcdefghijklmnopqr1234567890</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by date_hour</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="underLabel">Abcdefghijklm87239473no 128138213682732</option>
        <option name="useColors">1</option>
      </single>
    </panel>
  </row>
  <row>
    <panel>
      <title>Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890</title>
    </panel>
    <panel>
      <title>Abcdefghijkl</title>
    </panel>
    <panel>
      <title>Abcdefghijklmnopqrstuvwxyz1234567890</title>
    </panel>
    <panel>
      <title>Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz123</title>
    </panel>
    <panel>
      <title>Abcdefghijklmnopqr1234567890</title>
    </panel>
    <panel>
      <title>Abcdefghijklm87239473no 128138213682732</title>
    </panel>
  </row>
  <row>
    <panel>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=INFO
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=ERROR
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=WARN
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="rangeValues">[0,200,500,1000]</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by component
| table count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by date_mday</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by date_hour</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
    </panel>
  </row>
</dashboard>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

0 Karma

kumargaurav
New Member

Thanks a lot @niketnilay. It worked

0 Karma

niketn
Legend

@kumargaurav, following are the two option you can try,

1) Add to Single value Caption using Format Visualization option which adds Simple XML Configuration like the following:

<option name="underLabel">Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890</option>

This will move all the Title below single value. This can accommodate for longer text in single line as compared to title but will truncate before and/or after since it is always single line.
2) Create a dummy row with same count of panels as Single Value Panels and use only for <title>
Please refer to screenshot below. First row is one with issue. Second is the option with Caption and Third row is solution with separate dummy row with empty panels having <title>

alt text

Following is the Simple XML code:

<dashboard>
  <label>Single Value Alignment</label>
  <row>
    <panel>
      <title>Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890</title>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=INFO
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
    </panel>
    <panel>
      <title>Abcdefghijkl</title>      
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=ERROR
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
    </panel>
    <panel>
      <title>Abcdefghijklmnopqrstuvwxyz1234567890</title>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=WARN
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="rangeValues">[0,200,500,1000]</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
    </panel>
    <panel>
      <title>Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz123</title>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by component
| table count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
    </panel>
    <panel>
      <title>Abcdefghijklmnopqr1234567890</title>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by date_mday</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
    </panel>
    <panel>
      <title>Abcdefghijklm87239473no 128138213682732</title>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by date_hour</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
    </panel>
  </row>
  <row>
    <panel>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=INFO
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="underLabel">Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=ERROR
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="underLabel">Abcdefghijkl</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=WARN
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="rangeValues">[0,200,500,1000]</option>
        <option name="refresh.display">progressbar</option>
        <option name="underLabel">Abcdefghijklmnopqrstuvwxyz1234567890</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by component
| table count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="underLabel">Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz123</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by date_mday</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="underLabel">Abcdefghijklmnopqr1234567890</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by date_hour</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="underLabel">Abcdefghijklm87239473no 128138213682732</option>
        <option name="useColors">1</option>
      </single>
    </panel>
  </row>
  <row>
    <panel>
      <title>Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890</title>
    </panel>
    <panel>
      <title>Abcdefghijkl</title>
    </panel>
    <panel>
      <title>Abcdefghijklmnopqrstuvwxyz1234567890</title>
    </panel>
    <panel>
      <title>Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz1234567890 Abcdefghijklmnopqrstuvwxyz123</title>
    </panel>
    <panel>
      <title>Abcdefghijklmnopqr1234567890</title>
    </panel>
    <panel>
      <title>Abcdefghijklm87239473no 128138213682732</title>
    </panel>
  </row>
  <row>
    <panel>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=INFO
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=ERROR
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level=WARN
| stats count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="rangeValues">[0,200,500,1000]</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by component
| table count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by date_mday</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
      <single>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
| stats count by date_hour</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
    </panel>
  </row>
</dashboard>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to Officially Supported Splunk ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI! Discover how Splunk’s agentic AI ...