<?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 Can I change panel width in a dashboard using Simple XML? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Can-I-change-panel-width-in-a-dashboard-using-Simple-XML/m-p/229265#M14201</link>
    <description>&lt;P&gt;&lt;STRONG&gt;I have 3 single panels and a table on a row in a dashboard&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard&amp;gt;
   *...*
   *...*
   *...*
   &amp;lt;row&amp;gt;
      &amp;lt;panel&amp;gt;&amp;lt;single&amp;gt;&amp;lt;search base="Results"&amp;gt;&amp;lt;query&amp;gt;table $TheGood$&amp;lt;/query&amp;gt;&amp;lt;/search&amp;gt;&amp;lt;/single&amp;amp;gt;&amp;lt;/panel&amp;gt;
      &amp;lt;panel&amp;gt;&amp;lt;single&amp;gt;&amp;lt;search base="Results"&amp;gt;&amp;lt;query&amp;gt;table $TheBad$&amp;lt;/query&amp;gt;&amp;lt;/search&amp;gt;&amp;lt;/single&amp;gt;&amp;lt;/panel&amp;gt;
      &amp;lt;panel&amp;gt;&amp;lt;single&amp;gt;&amp;lt;search base="Results"&amp;gt;&amp;lt;query&amp;gt;table $TheUgly$&amp;lt;/query&amp;gt;&amp;lt;/search&amp;gt;&amp;lt;/single&amp;gt;&amp;lt;/panel&amp;gt;
      &amp;lt;panel&amp;gt;
         &amp;lt;table&amp;gt;
            &amp;lt;search base="Results"&amp;gt;
               &amp;lt;query&amp;gt;table This, That, and More;&amp;lt;/query&amp;gt;
            &amp;lt;/search&amp;gt;
         &amp;lt;/table&amp;gt;
      &amp;lt;/panel&amp;gt;
   &amp;lt;row&amp;gt;
&amp;lt;/dashboard&amp;gt; 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;However, I would like to have each single only take up 15% of the row, and the remaining 55% taken up by the table. Currently, the row gives each panel 25% space for its content (4 panels split 4-ways gives 25% for each panel). Is there any way to override the defaults using simple xml?&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 17 Nov 2015 17:08:39 GMT</pubDate>
    <dc:creator>ArthurGautesen</dc:creator>
    <dc:date>2015-11-17T17:08:39Z</dc:date>
    <item>
      <title>Can I change panel width in a dashboard using Simple XML?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Can-I-change-panel-width-in-a-dashboard-using-Simple-XML/m-p/229265#M14201</link>
      <description>&lt;P&gt;&lt;STRONG&gt;I have 3 single panels and a table on a row in a dashboard&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard&amp;gt;
   *...*
   *...*
   *...*
   &amp;lt;row&amp;gt;
      &amp;lt;panel&amp;gt;&amp;lt;single&amp;gt;&amp;lt;search base="Results"&amp;gt;&amp;lt;query&amp;gt;table $TheGood$&amp;lt;/query&amp;gt;&amp;lt;/search&amp;gt;&amp;lt;/single&amp;amp;gt;&amp;lt;/panel&amp;gt;
      &amp;lt;panel&amp;gt;&amp;lt;single&amp;gt;&amp;lt;search base="Results"&amp;gt;&amp;lt;query&amp;gt;table $TheBad$&amp;lt;/query&amp;gt;&amp;lt;/search&amp;gt;&amp;lt;/single&amp;gt;&amp;lt;/panel&amp;gt;
      &amp;lt;panel&amp;gt;&amp;lt;single&amp;gt;&amp;lt;search base="Results"&amp;gt;&amp;lt;query&amp;gt;table $TheUgly$&amp;lt;/query&amp;gt;&amp;lt;/search&amp;gt;&amp;lt;/single&amp;gt;&amp;lt;/panel&amp;gt;
      &amp;lt;panel&amp;gt;
         &amp;lt;table&amp;gt;
            &amp;lt;search base="Results"&amp;gt;
               &amp;lt;query&amp;gt;table This, That, and More;&amp;lt;/query&amp;gt;
            &amp;lt;/search&amp;gt;
         &amp;lt;/table&amp;gt;
      &amp;lt;/panel&amp;gt;
   &amp;lt;row&amp;gt;
&amp;lt;/dashboard&amp;gt; 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;However, I would like to have each single only take up 15% of the row, and the remaining 55% taken up by the table. Currently, the row gives each panel 25% space for its content (4 panels split 4-ways gives 25% for each panel). Is there any way to override the defaults using simple xml?&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 17:08:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Can-I-change-panel-width-in-a-dashboard-using-Simple-XML/m-p/229265#M14201</guid>
      <dc:creator>ArthurGautesen</dc:creator>
      <dc:date>2015-11-17T17:08:39Z</dc:date>
    </item>
    <item>
      <title>Re: Can I change panel width in a dashboard using Simple XML?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Can-I-change-panel-width-in-a-dashboard-using-Simple-XML/m-p/229266#M14202</link>
      <description>&lt;P&gt;There are some examples in the developer's docs: &lt;A href="http://dev.splunk.com/view/SP-CAAAE4Y"&gt;Charts Using Simple XML&lt;/A&gt;. You may also wish to download the &lt;A href="https://splunkbase.splunk.com/app/1603/"&gt;Dashboard Examples&lt;/A&gt; for Splunk 6. So you can do it, but it's not as simple as plugging in an option tag, unfortunately, as you can do for height. &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.3.1/Viz/Visualizationreference"&gt;Dashboards and Visualizations&lt;/A&gt; Reference.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 20:56:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Can-I-change-panel-width-in-a-dashboard-using-Simple-XML/m-p/229266#M14202</guid>
      <dc:creator>nnmiller</dc:creator>
      <dc:date>2015-11-17T20:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: Can I change panel width in a dashboard using Simple XML?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Can-I-change-panel-width-in-a-dashboard-using-Simple-XML/m-p/229267#M14203</link>
      <description>&lt;P&gt;Yes, it is not easy. So far, the simplest method has been to just make two panels on the row, and setup an html table in the first one, like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard&amp;gt;
   *...*
   *...*
   *...*
   &amp;lt;row&amp;gt;
      &amp;lt;panel&amp;gt;
         &amp;lt;html&amp;gt;
            &amp;lt;table style="width:100% !important;"&amp;gt;
               &amp;lt;tr&amp;gt;
                  &amp;lt;td style="width:33% !important;"&amp;gt;$TheGood$&amp;lt;/td&amp;gt;
                  &amp;lt;td style="width:33% !important;"&amp;gt;$TheBad$&amp;lt;/td&amp;gt;
                  &amp;lt;td style="width:33% !important;"&amp;gt;$TheUgly$&amp;lt;/td&amp;gt;
               &amp;lt;/tr&amp;gt;
            &amp;lt;/table&amp;gt;
         &amp;lt;/html&amp;gt;
      &amp;lt;/panel&amp;gt;
      &amp;lt;panel&amp;gt;
         &amp;lt;table&amp;gt;
            &amp;lt;search base="Results"&amp;gt;
               &amp;lt;query&amp;gt;table This, That, and More;&amp;lt;/query&amp;gt;
            &amp;lt;/search&amp;gt;
         &amp;lt;/table&amp;gt;
      &amp;lt;/panel&amp;gt;
   &amp;lt;row&amp;gt;
&amp;lt;/dashboard&amp;gt; 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As there are only two panels, it splits the row evenly and gives each panel 50% of the row. It's as close as I can get and still keep things simple. Since I'm using tokens, it isn't much of a switch from displaying within a simple xml panel, or an html panel.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2016 19:16:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Can-I-change-panel-width-in-a-dashboard-using-Simple-XML/m-p/229267#M14203</guid>
      <dc:creator>ArthurGautesen</dc:creator>
      <dc:date>2016-01-06T19:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: Can I change panel width in a dashboard using Simple XML?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Can-I-change-panel-width-in-a-dashboard-using-Simple-XML/m-p/229268#M14204</link>
      <description>&lt;P&gt;hi,&lt;BR /&gt;
this is an example of code that does the same job&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard script="custom_layout_width.js"&amp;gt;
  &amp;lt;label&amp;gt;Layout Customization: Panel Width&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
      &amp;lt;single&amp;gt;
        &amp;lt;searchString&amp;gt;index=_internal sourcetype=splunkd | stats count&amp;lt;/searchString&amp;gt;
        &amp;lt;earliestTime&amp;gt;-60m@m&amp;lt;/earliestTime&amp;gt;
        &amp;lt;latestTime&amp;gt;now&amp;lt;/latestTime&amp;gt;
        &amp;lt;option name="underLabel"&amp;gt;splunkd events&amp;lt;/option&amp;gt;
        &amp;lt;option name="linkView"&amp;gt;search&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
      &amp;lt;/single&amp;gt;
      &amp;lt;single&amp;gt;
        &amp;lt;searchString&amp;gt;index=_internal sourcetype=*access | stats count&amp;lt;/searchString&amp;gt;
        &amp;lt;earliestTime&amp;gt;-60m@m&amp;lt;/earliestTime&amp;gt;
        &amp;lt;latestTime&amp;gt;now&amp;lt;/latestTime&amp;gt;
        &amp;lt;option name="underLabel"&amp;gt;access events&amp;lt;/option&amp;gt;
      &amp;lt;/single&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;searchString&amp;gt;index=_internal | timechart count&amp;lt;/searchString&amp;gt;
        &amp;lt;earliestTime&amp;gt;-60m@m&amp;lt;/earliestTime&amp;gt;
        &amp;lt;latestTime&amp;gt;now&amp;lt;/latestTime&amp;gt;
      &amp;lt;/chart&amp;gt;
  &amp;lt;/row&amp;gt;
  &amp;lt;row&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;searchString&amp;gt;index=_internal | stats count by sourcetype&amp;lt;/searchString&amp;gt;
        &amp;lt;earliestTime&amp;gt;-60m@m&amp;lt;/earliestTime&amp;gt;
        &amp;lt;latestTime&amp;gt;now&amp;lt;/latestTime&amp;gt;
      &amp;lt;/table&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;next you add the custom_layout_width.js&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;require(['jquery', 'splunkjs/mvc/simplexml/ready!'], function($) {
    // Grab the DOM for the first dashboard row
    var firstRow = $('.dashboard-row').first();
    // Get the dashboard cells (which are the parent elements of the actual panels and define the panel size)
    var panelCells = $(firstRow).children('.dashboard-cell');
    // Adjust the cells' width
    $(panelCells[0]).css('width', '20%');
    $(panelCells[1]).css('width', '20%');
    $(panelCells[2]).css('width', '60%');
});
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:20:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Can-I-change-panel-width-in-a-dashboard-using-Simple-XML/m-p/229268#M14204</guid>
      <dc:creator>gyslainlatsa</dc:creator>
      <dc:date>2020-09-29T08:20:15Z</dc:date>
    </item>
  </channel>
</rss>

