<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Alter the width of single value panel in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Alter-the-width-of-single-value-panel/m-p/229973#M68144</link>
    <description>&lt;P&gt;I am running 7.2.1 and this is not working for me neither.&lt;/P&gt;</description>
    <pubDate>Tue, 01 Jan 2019 00:22:07 GMT</pubDate>
    <dc:creator>jhea10</dc:creator>
    <dc:date>2019-01-01T00:22:07Z</dc:date>
    <item>
      <title>Alter the width of single value panel</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Alter-the-width-of-single-value-panel/m-p/229968#M68139</link>
      <description>&lt;P&gt;How to resize the width of single value dashboard panels in case if I have only one column in a row, instead of making it to occupy 100% width which is default ?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2016 05:30:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Alter-the-width-of-single-value-panel/m-p/229968#M68139</guid>
      <dc:creator>gokool2u</dc:creator>
      <dc:date>2016-10-05T05:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: Alter the width of single value panel</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Alter-the-width-of-single-value-panel/m-p/229969#M68140</link>
      <description>&lt;P&gt;You have to edit the CSS for the panel in the dashboard. Splunk does not provide any mechanism to set the width of a panel via SimpleXML. In fact, the Splunk Web framework tries really hard to set the panels widths so that all of the panels on a row are the same width, and it wants the row to occupy the screen.&lt;/P&gt;

&lt;P&gt;In your dashboard, give each &lt;CODE&gt;panel&lt;/CODE&gt; element an id, e.g., &lt;CODE&gt;&amp;lt;panel id="panel_value_1"&amp;gt;&lt;/CODE&gt;. In a custom CSS file for this dashboard, you would than do the following to set the width to 300 px:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#panel_value_1 {
  width: 300px !important;
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now, there is a mechanism others have come up with to use a custom JS script to set the width of panels by using a template ID for the panel. A link with the details is here: &lt;A href="https://answers.splunk.com/answers/180028/how-to-change-the-width-of-two-dashboard-panels-in.html"&gt;https://answers.splunk.com/answers/180028/how-to-change-the-width-of-two-dashboard-panels-in.html&lt;/A&gt;. The one caveat is this approach will only work for a static panel that does not toggle the visibility of the panels in any way. If you ever toggle the visibility of the panel, you will lose the custom width set by the script. In those cases, you have to use CSS settings like the one above.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2016 10:42:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Alter-the-width-of-single-value-panel/m-p/229969#M68140</guid>
      <dc:creator>rjthibod</dc:creator>
      <dc:date>2016-10-05T10:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: Alter the width of single value panel</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Alter-the-width-of-single-value-panel/m-p/229970#M68141</link>
      <description>&lt;P&gt;@gokool2u, did my answer down below help you? If so, please accept it. If not, please clarify any problems.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2016 15:00:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Alter-the-width-of-single-value-panel/m-p/229970#M68141</guid>
      <dc:creator>rjthibod</dc:creator>
      <dc:date>2016-10-14T15:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: Alter the width of single value panel</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Alter-the-width-of-single-value-panel/m-p/229971#M68142</link>
      <description>&lt;P&gt;Its not working for me..&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2017 09:02:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Alter-the-width-of-single-value-panel/m-p/229971#M68142</guid>
      <dc:creator>gvnd</dc:creator>
      <dc:date>2017-07-12T09:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: Alter the width of single value panel</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Alter-the-width-of-single-value-panel/m-p/229972#M68143</link>
      <description>&lt;P&gt;Following is a run anywhere search based on Splunk's _internal database. In line with @rjthibod, it is setting the width of Panel containing Single value with &lt;CODE&gt;id="singleValuePanel"&lt;/CODE&gt; to 20% instead of 100%&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;        &amp;lt;style&amp;gt;
          #singleValuePanel{
            width: 20% !important;
          }
        &amp;lt;/style&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;PS: &lt;CODE&gt;&amp;lt;html depends="$hiddenForCSS$"&amp;gt;&lt;/CODE&gt; has been added to always hide the HTML panel.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;row&amp;gt;
    &amp;lt;panel id="singleValuePanel"&amp;gt;
      &amp;lt;html depends="$hiddenForCSS$"&amp;gt;
        &amp;lt;style&amp;gt;
          #singleValuePanel{
            width: 20% !important;
          }
        &amp;lt;/style&amp;gt;
      &amp;lt;/html&amp;gt;
      &amp;lt;single&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=_internal sourcetype=splunkd log_level!=INFO
| timechart count&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="colorBy"&amp;gt;trend&amp;lt;/option&amp;gt;
        &amp;lt;option name="colorMode"&amp;gt;block&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="numberPrecision"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="rangeColors"&amp;gt;["0x65a637","0x6db7c6","0xf7bc38","0xf58f39","0xd93f3c"]&amp;lt;/option&amp;gt;
        &amp;lt;option name="rangeValues"&amp;gt;[0,30,70,100]&amp;lt;/option&amp;gt;
        &amp;lt;option name="showSparkline"&amp;gt;1&amp;lt;/option&amp;gt;
        &amp;lt;option name="showTrendIndicator"&amp;gt;1&amp;lt;/option&amp;gt;
        &amp;lt;option name="trellis.enabled"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="trellis.scales.shared"&amp;gt;1&amp;lt;/option&amp;gt;
        &amp;lt;option name="trellis.size"&amp;gt;medium&amp;lt;/option&amp;gt;
        &amp;lt;option name="trendColorInterpretation"&amp;gt;inverse&amp;lt;/option&amp;gt;
        &amp;lt;option name="trendDisplayMode"&amp;gt;absolute&amp;lt;/option&amp;gt;
        &amp;lt;option name="unitPosition"&amp;gt;after&amp;lt;/option&amp;gt;
        &amp;lt;option name="useColors"&amp;gt;1&amp;lt;/option&amp;gt;
        &amp;lt;option name="useThousandSeparators"&amp;gt;1&amp;lt;/option&amp;gt;
      &amp;lt;/single&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Jul 2017 09:48:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Alter-the-width-of-single-value-panel/m-p/229972#M68143</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-07-12T09:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: Alter the width of single value panel</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Alter-the-width-of-single-value-panel/m-p/229973#M68144</link>
      <description>&lt;P&gt;I am running 7.2.1 and this is not working for me neither.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jan 2019 00:22:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Alter-the-width-of-single-value-panel/m-p/229973#M68144</guid>
      <dc:creator>jhea10</dc:creator>
      <dc:date>2019-01-01T00:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: Alter the width of single value panel</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Alter-the-width-of-single-value-panel/m-p/229974#M68145</link>
      <description>&lt;P&gt;Splunk has decided to rework most of the JS / CSS setup in Splunk 7.2, and they broke both of the answers above in the process.&lt;/P&gt;

&lt;P&gt;Based on my cursory glance at things in 7.2 (which is a brief glance since I don't use Splunk often these days), my guess is you will have to make the CSS adjustment in JS.&lt;/P&gt;

&lt;P&gt;Look at the Splunk Dashboards Examples app (&lt;A href="https://splunkbase.splunk.com/app/1603/"&gt;https://splunkbase.splunk.com/app/1603/&lt;/A&gt;). Open the source files and look at the dashboard &lt;CODE&gt;custom_layout_width.xml&lt;/CODE&gt; and its accompanying JS file &lt;CODE&gt;custom_layout_width.js&lt;/CODE&gt;.  That serves as a simple example of how to adjust the width of panels.&lt;/P&gt;

&lt;P&gt;The gist is you have to find the &lt;CODE&gt;dashboard-cell&lt;/CODE&gt; element that belongs to your panel, and then set the &lt;CODE&gt;width&lt;/CODE&gt; setting for it.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jan 2019 14:19:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Alter-the-width-of-single-value-panel/m-p/229974#M68145</guid>
      <dc:creator>rjthibod</dc:creator>
      <dc:date>2019-01-01T14:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: Alter the width of single value panel</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Alter-the-width-of-single-value-panel/m-p/229975#M68146</link>
      <description>&lt;P&gt;this is effective for me thanks for this!&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2019 05:59:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Alter-the-width-of-single-value-panel/m-p/229975#M68146</guid>
      <dc:creator>mdmaala</dc:creator>
      <dc:date>2019-03-14T05:59:44Z</dc:date>
    </item>
  </channel>
</rss>

