<?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 create a line graph in XML that displays the (latest time - earliest time) in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-line-graph-in-XML-that-displays-the-latest-time/m-p/182038#M11195</link>
    <description>&lt;P&gt;Try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | stats max(_time) as Latest min(_time) as Earliest| eval temp=Latest." ".Earliest | table temp| makemv temp | mvexpand temp | rename temp as _time | eval Series=1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 20 Aug 2015 16:04:34 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2015-08-20T16:04:34Z</dc:date>
    <item>
      <title>How to create a line graph in XML that displays the (latest time - earliest time)</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-line-graph-in-XML-that-displays-the-latest-time/m-p/182037#M11194</link>
      <description>&lt;P&gt;Background: Every day, I run a script on a log file which filters it into another file. I then indexed the filtered file. So I want to create a line graph that takes the earliest time and latest time (first line and last line of the filtered file) and display it on a line graph. &lt;/P&gt;

&lt;P&gt;For example: In the log file I will have...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2013-06-20 03:12:30,001 INFORMATION Begin TITLE OF SCRIPT
.
.
.

2013-06-20 04:12:30,001 INFORMATION Finished TITLE OF SCRIPT 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;(It can be different from the first script)&lt;/P&gt;

&lt;P&gt;So the fields I have at the moment are..... Date = 2013-06-20, date_hour=04, date_minute=12, date_second=30, position=finished&lt;/P&gt;

&lt;P&gt;What I have so far for my search is... &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=... source=... | search earliest | 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 07:02:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-line-graph-in-XML-that-displays-the-latest-time/m-p/182037#M11194</guid>
      <dc:creator>alanxu</dc:creator>
      <dc:date>2020-09-29T07:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a line graph in XML that displays the (latest time - earliest time)</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-line-graph-in-XML-that-displays-the-latest-time/m-p/182038#M11195</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | stats max(_time) as Latest min(_time) as Earliest| eval temp=Latest." ".Earliest | table temp| makemv temp | mvexpand temp | rename temp as _time | eval Series=1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Aug 2015 16:04:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-line-graph-in-XML-that-displays-the-latest-time/m-p/182038#M11195</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-08-20T16:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a line graph in XML that displays the (latest time - earliest time)</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-line-graph-in-XML-that-displays-the-latest-time/m-p/182039#M11196</link>
      <description>&lt;P&gt;Could you try to explain your commands? Just for future reference. Thank you for your answer.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2015 16:30:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-line-graph-in-XML-that-displays-the-latest-time/m-p/182039#M11196</guid>
      <dc:creator>alanxu</dc:creator>
      <dc:date>2015-08-20T16:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a line graph in XML that displays the (latest time - earliest time)</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-line-graph-in-XML-that-displays-the-latest-time/m-p/182040#M11197</link>
      <description>&lt;P&gt;Was latest." ".earliest for an operator?&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2015 16:41:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-line-graph-in-XML-that-displays-the-latest-time/m-p/182040#M11197</guid>
      <dc:creator>alanxu</dc:creator>
      <dc:date>2015-08-20T16:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a line graph in XML that displays the (latest time - earliest time)</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-line-graph-in-XML-that-displays-the-latest-time/m-p/182041#M11198</link>
      <description>&lt;P&gt;So I still havent been able to figure this out. I looked at every command with the answer below. However, still cant get the right output. My XML code is...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;title&amp;gt;Completion Time&amp;lt;/title&amp;gt;
        &amp;lt;searchString&amp;gt;host=.... source=.... | stats max(_time) AS Latest min(_time) AS Earliest | eval temp=Latest - Earliest | table temp | makemv temp | mvexpand temp | rename temp as _time | eval Series=1&amp;lt;/searchString&amp;gt;
        &amp;lt;earliestTime&amp;gt;$timetoken.earliest$&amp;lt;/earliestTime&amp;gt;
        &amp;lt;latestTime&amp;gt;$timetoken.latest$&amp;lt;/latestTime&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;host=.... source=..... | stats max(_time) AS Latest min(_time) AS Earliest | eval temp=Latest - Earliest | table temp | makemv temp | mvexpand temp | rename temp as _time | eval Series=1&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;$timetoken.earliest$&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;$timetoken.latest$&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
                &amp;lt;option name="charting.chart"&amp;gt;line&amp;lt;/option&amp;gt;
                &amp;lt;option name="charting.axisY2.enabled"&amp;gt;false&amp;lt;/option&amp;gt;
                &amp;lt;option name="charting.axisLabelsX.majorLabelStyle.overflowMode"&amp;gt;ellipsisNone&amp;lt;/option&amp;gt;
                &amp;lt;option name="charting.axisLabelsX.majorLabelStyle.rotation"&amp;gt;0&amp;lt;/option&amp;gt;
                &amp;lt;option name="charting.axisTitleX.visibility"&amp;gt;visible&amp;lt;/option&amp;gt;
                &amp;lt;option name="charting.axisTitleY.visibility"&amp;gt;visible&amp;lt;/option&amp;gt;
                &amp;lt;option name="charting.axisTitleY2.visibility"&amp;gt;visible&amp;lt;/option&amp;gt;
                &amp;lt;option name="charting.axisX.scale"&amp;gt;linear&amp;lt;/option&amp;gt;
                &amp;lt;option name="charting.axisY.scale"&amp;gt;linear&amp;lt;/option&amp;gt;
                &amp;lt;option name="charting.axisY2.scale"&amp;gt;inherit&amp;lt;/option&amp;gt;
                &amp;lt;option name="charting.chart.bubbleMaximumSize"&amp;gt;50&amp;lt;/option&amp;gt;
                &amp;lt;option name="charting.chart.bubbleMinimumSize"&amp;gt;10&amp;lt;/option&amp;gt;
                &amp;lt;option name="charting.chart.bubbleSizeBy"&amp;gt;area&amp;lt;/option&amp;gt;
                &amp;lt;option name="charting.chart.nullValueMode"&amp;gt;zero&amp;lt;/option&amp;gt;
                &amp;lt;option name="charting.chart.sliceCollapsingThreshold"&amp;gt;0.01&amp;lt;/option&amp;gt;
                &amp;lt;option name="charting.chart.stackMode"&amp;gt;default&amp;lt;/option&amp;gt;
                &amp;lt;option name="charting.chart.style"&amp;gt;shiny&amp;lt;/option&amp;gt;
                &amp;lt;option name="charting.drilldown"&amp;gt;all&amp;lt;/option&amp;gt;
                &amp;lt;option name="charting.layout.splitSeries"&amp;gt;0&amp;lt;/option&amp;gt;
                &amp;lt;option name="charting.legend.labelStyle.overflowMode"&amp;gt;ellipsisMiddle&amp;lt;/option&amp;gt;
                &amp;lt;option name="charting.legend.placement"&amp;gt;right&amp;lt;/option&amp;gt;
                &amp;lt;option name="charting.axisTitleY.text"&amp;gt;Completion Time&amp;lt;/option&amp;gt;
                &amp;lt;option name="charting.drilldown"&amp;gt;all&amp;lt;/option&amp;gt;
            &amp;lt;/chart&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Aug 2015 19:52:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-line-graph-in-XML-that-displays-the-latest-time/m-p/182041#M11198</guid>
      <dc:creator>alanxu</dc:creator>
      <dc:date>2015-08-20T19:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a line graph in XML that displays the (latest time - earliest time)</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-line-graph-in-XML-that-displays-the-latest-time/m-p/182042#M11199</link>
      <description>&lt;P&gt;Its not showing a line at all on my graph.. And it goes back to 1970 for some reason even though the pull down I have on the dashboard is only at today. (Today is default)&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2015 19:52:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-line-graph-in-XML-that-displays-the-latest-time/m-p/182042#M11199</guid>
      <dc:creator>alanxu</dc:creator>
      <dc:date>2015-08-20T19:52:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a line graph in XML that displays the (latest time - earliest time)</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-line-graph-in-XML-that-displays-the-latest-time/m-p/182043#M11200</link>
      <description>&lt;P&gt;@somesoni2&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2015 22:46:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-line-graph-in-XML-that-displays-the-latest-time/m-p/182043#M11200</guid>
      <dc:creator>alanxu</dc:creator>
      <dc:date>2015-08-20T22:46:21Z</dc:date>
    </item>
  </channel>
</rss>

