<?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: How to hide panel until pan and zoom range is selected? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-hide-panel-until-pan-and-zoom-range-is-selected/m-p/523563#M35399</link>
    <description>&lt;P&gt;Hi thanks for your help!! I just have 1 issue right now. I don't think my $job.latestTime$ token is setting a time value at all. I printed it out in the HTML panel just to check what it looked like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    &amp;lt;done&amp;gt;
              &amp;lt;eval token="check"&amp;gt;$job.latestTime$&amp;lt;/eval&amp;gt;
    &amp;lt;/done&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Printing the token out gave me $check$ as the output in the panel. However when I did the same thing with $job.earliestTime$, this printed out a time value (but doesn't seem to be the right start time of the chart)&lt;/P&gt;&lt;P&gt;Why might this be?&lt;/P&gt;</description>
    <pubDate>Thu, 08 Oct 2020 01:23:28 GMT</pubDate>
    <dc:creator>eggsu</dc:creator>
    <dc:date>2020-10-08T01:23:28Z</dc:date>
    <item>
      <title>How to hide panel until pan and zoom range is selected?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-hide-panel-until-pan-and-zoom-range-is-selected/m-p/523108#M35353</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;One of my panel's is based off the start and end token of a pan and zoom selection (like the example shown).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-10-06 at 3.46.40 pm.png" style="width: 813px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/11131i08F56EAB3A019881/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2020-10-06 at 3.46.40 pm.png" alt="Screen Shot 2020-10-06 at 3.46.40 pm.png" /&gt;&lt;/span&gt;&lt;BR /&gt;However without any user selection,&amp;nbsp; I want to hide the 2nd panel until the user has decided to select a pan and zoom time range.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried doing depends="$selection.earliest$" in the 2nd panel's xml but it doesn't seem to work. How do i go about this?&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2020 04:49:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-hide-panel-until-pan-and-zoom-range-is-selected/m-p/523108#M35353</guid>
      <dc:creator>eggsu</dc:creator>
      <dc:date>2020-10-06T04:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide panel until pan and zoom range is selected?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-hide-panel-until-pan-and-zoom-range-is-selected/m-p/523130#M35360</link>
      <description>&lt;P&gt;First thing to do is unset the token which controls the display of the panel in your init block:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;  &amp;lt;init&amp;gt;
    &amp;lt;unset token="panel_start_time"&amp;gt;&amp;lt;/unset&amp;gt;
  &amp;lt;/init&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Next, in the search for the first panel, add a done block and set tokens when the search completes:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;          &amp;lt;done&amp;gt;
            &amp;lt;eval token="earliestTime"&amp;gt;if($job.isDone$,strptime($job.earliestTime$,"%Y-%m-%dT%H:%M:%S.%Q%z"),null())&amp;lt;/eval&amp;gt;
            &amp;lt;eval token="latestTime"&amp;gt;if($job.isDone$,relative_time(strptime($job.latestTime$,"%Y-%m-%dT%H:%M:%S.%Q%z")-1,"@h"),null())&amp;lt;/eval&amp;gt;
          &amp;lt;/done&amp;gt;
        &amp;lt;/search&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;The job.earliest and job.latest are in local time format including timezone offset. You may need to adjust these format strings to match. Also, because my first panel search is bin'd and snapped to the hour, the job.latestTime is the end of the hour, whereas I actually need the beginning of the last hour for the subsequent search (hence -1 (second) and resnap (@h)). You may need to adjust this to your needs.&lt;/P&gt;&lt;P&gt;Next, add a selection block to the first panel to capture the selection start and finish:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;        &amp;lt;selection&amp;gt;
          &amp;lt;eval token="panel_start_time"&amp;gt;if($start$=$earliestTime$ AND $end$=$latestTime$,null(),$start$)&amp;lt;/eval&amp;gt;
          &amp;lt;eval token="panel_end_time"&amp;gt;$end$&amp;lt;/eval&amp;gt;
        &amp;lt;/selection&amp;gt;
      &amp;lt;/chart&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;If selection start is equal to earliestTime (as previously calculated) and selection end is equal to latestTime (as previously calculated), there is no selection currently active; setting the token to null() is equivalent to unset.&lt;/P&gt;&lt;P&gt;In your second panel, set it to display if the panel_start_time is set (you could have used a different token here but you are setting up panel_start_time in the selection block anyway):&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    &amp;lt;panel depends="$panel_start_time$"&amp;gt;
      &amp;lt;chart&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;Finally, set the time period for your search in the second panel:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;          &amp;lt;earliest&amp;gt;$panel_start_time$&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;$panel_end_time$&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2020 08:38:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-hide-panel-until-pan-and-zoom-range-is-selected/m-p/523130#M35360</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-06T08:38:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide panel until pan and zoom range is selected?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-hide-panel-until-pan-and-zoom-range-is-selected/m-p/523563#M35399</link>
      <description>&lt;P&gt;Hi thanks for your help!! I just have 1 issue right now. I don't think my $job.latestTime$ token is setting a time value at all. I printed it out in the HTML panel just to check what it looked like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    &amp;lt;done&amp;gt;
              &amp;lt;eval token="check"&amp;gt;$job.latestTime$&amp;lt;/eval&amp;gt;
    &amp;lt;/done&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Printing the token out gave me $check$ as the output in the panel. However when I did the same thing with $job.earliestTime$, this printed out a time value (but doesn't seem to be the right start time of the chart)&lt;/P&gt;&lt;P&gt;Why might this be?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 01:23:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-hide-panel-until-pan-and-zoom-range-is-selected/m-p/523563#M35399</guid>
      <dc:creator>eggsu</dc:creator>
      <dc:date>2020-10-08T01:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide panel until pan and zoom range is selected?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-hide-panel-until-pan-and-zoom-range-is-selected/m-p/523587#M35402</link>
      <description>&lt;P&gt;What is the value of check that you are seeing?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 06:42:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-hide-panel-until-pan-and-zoom-range-is-selected/m-p/523587#M35402</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-08T06:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide panel until pan and zoom range is selected?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-hide-panel-until-pan-and-zoom-range-is-selected/m-p/524148#M35455</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-10-12 at 3.55.19 pm.png" style="width: 112px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/11253i57C39AE381E532C8/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2020-10-12 at 3.55.19 pm.png" alt="Screen Shot 2020-10-12 at 3.55.19 pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The output looks like this.&lt;BR /&gt;The corresponding HTML XML is:&lt;/P&gt;&lt;P&gt;Where $check$ is:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;           &amp;lt;eval token="check"&amp;gt;$job.latestTime$&amp;lt;/eval&amp;gt;&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;      &amp;lt;html&amp;gt;
      $check$
      &amp;lt;br/&amp;gt;
      $earliestTime$
      &amp;lt;br/&amp;gt;
      $latestTime$
      &amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 12 Oct 2020 04:58:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-hide-panel-until-pan-and-zoom-range-is-selected/m-p/524148#M35455</guid>
      <dc:creator>eggsu</dc:creator>
      <dc:date>2020-10-12T04:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide panel until pan and zoom range is selected?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-hide-panel-until-pan-and-zoom-range-is-selected/m-p/524184#M35459</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;done&amp;gt;
  &amp;lt;eval token="check"&amp;gt;if($job.isDone$,$job.latestTime$,"Not finished")&amp;lt;/eval&amp;gt;
&amp;lt;/done&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 12 Oct 2020 07:23:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-hide-panel-until-pan-and-zoom-range-is-selected/m-p/524184#M35459</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-12T07:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide panel until pan and zoom range is selected?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-hide-panel-until-pan-and-zoom-range-is-selected/m-p/524295#M35469</link>
      <description>&lt;P&gt;I tried that too and the same problem occurs. I even tried doing this:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;  &amp;lt;done&amp;gt;
&amp;lt;eval token="checkTime"&amp;gt;if($job.isDone$,$job.latestTime$,"Not finished")&amp;lt;/eval&amp;gt;
&amp;lt;eval token="checkTime2"&amp;gt;if($job.isDone$,$job.earliestTime$,"Not finished")&amp;lt;/eval&amp;gt;
&amp;lt;/done&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;This resulted in the following output:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-10-13 at 11.30.15 am.png" style="width: 234px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/11262i7919E230056E4B1D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2020-10-13 at 11.30.15 am.png" alt="Screen Shot 2020-10-13 at 11.30.15 am.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2020 00:30:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-hide-panel-until-pan-and-zoom-range-is-selected/m-p/524295#M35469</guid>
      <dc:creator>eggsu</dc:creator>
      <dc:date>2020-10-13T00:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide panel until pan and zoom range is selected?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-hide-panel-until-pan-and-zoom-range-is-selected/m-p/524337#M35479</link>
      <description>&lt;P&gt;Which version of splunk are you using as this works. You may need to raise a support call with splunk.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2020 07:11:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-hide-panel-until-pan-and-zoom-range-is-selected/m-p/524337#M35479</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-13T07:11:11Z</dc:date>
    </item>
  </channel>
</rss>

