<?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 How do I remove gaps in charts? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-remove-gaps-in-charts/m-p/394315#M114541</link>
    <description>&lt;P&gt;Hi splunkers,&lt;/P&gt;

&lt;P&gt;I was able to plot a graph that, whilst it shows all the info I need, it also contains massive gaps that make it less appealing.&lt;BR /&gt;
Is it possible to eliminate those gaps? I'm not concerned about keeping the timeframe consistent.&lt;/P&gt;

&lt;P&gt;MY search is as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;gt; index=crypto CurrencyB="CND" OR
&amp;gt; CurrencyS="CND"  | timechart
&amp;gt; sum(eval(if(CurrencyB="CND",Buy,Sell
&amp;gt; *-1))) as Total,  sum(eval(if(CurrencyB="CND",round(Sell/Buy,8),null)))
&amp;gt; as UnitPrice  span=d cont=FALSE |
&amp;gt; streamstats sum(Total) as Gtotal
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Cheers&lt;/P&gt;</description>
    <pubDate>Thu, 27 Sep 2018 12:04:48 GMT</pubDate>
    <dc:creator>ADRIANODL</dc:creator>
    <dc:date>2018-09-27T12:04:48Z</dc:date>
    <item>
      <title>How do I remove gaps in charts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-remove-gaps-in-charts/m-p/394315#M114541</link>
      <description>&lt;P&gt;Hi splunkers,&lt;/P&gt;

&lt;P&gt;I was able to plot a graph that, whilst it shows all the info I need, it also contains massive gaps that make it less appealing.&lt;BR /&gt;
Is it possible to eliminate those gaps? I'm not concerned about keeping the timeframe consistent.&lt;/P&gt;

&lt;P&gt;MY search is as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;gt; index=crypto CurrencyB="CND" OR
&amp;gt; CurrencyS="CND"  | timechart
&amp;gt; sum(eval(if(CurrencyB="CND",Buy,Sell
&amp;gt; *-1))) as Total,  sum(eval(if(CurrencyB="CND",round(Sell/Buy,8),null)))
&amp;gt; as UnitPrice  span=d cont=FALSE |
&amp;gt; streamstats sum(Total) as Gtotal
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 12:04:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-remove-gaps-in-charts/m-p/394315#M114541</guid>
      <dc:creator>ADRIANODL</dc:creator>
      <dc:date>2018-09-27T12:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: How do I remove gaps in charts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-remove-gaps-in-charts/m-p/394316#M114542</link>
      <description>&lt;P&gt;Hi @ADRIANODL,&lt;BR /&gt;
   Ideally your query should work fine and as expected as you have mentioned &lt;STRONG&gt;cont=false&lt;/STRONG&gt; with timechart, but if you are using old version of Splunk then please check Splunk doc of timechart (&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.6/SearchReference/Timechart"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.6/SearchReference/Timechart&lt;/A&gt;) with Splunk version are you using. If not work try another approach below with &lt;STRONG&gt;stats&lt;/STRONG&gt; function, if you are sure you want your data &lt;STRONG&gt;month wise&lt;/STRONG&gt; (as show in the attached screenshot of question) then following query may help.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=crypto CurrencyB="CND" OR CurrencyS="CND" 
| eval month=date_month." ".date_year
| stats sum(eval(if(CurrencyB="CND",Buy,Sell*-1))) as Total, sum(eval(if(CurrencyB="CND",round(Sell/Buy,8),null))) as UnitPrice by month
| streamstats sum(Total) as Gtotal
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Try above query!!&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 14:12:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-remove-gaps-in-charts/m-p/394316#M114542</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2018-09-27T14:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do I remove gaps in charts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-remove-gaps-in-charts/m-p/394317#M114543</link>
      <description>&lt;P&gt;Did you try using cont=TRUE?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 14:43:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-remove-gaps-in-charts/m-p/394317#M114543</guid>
      <dc:creator>Vijeta</dc:creator>
      <dc:date>2018-09-27T14:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: How do I remove gaps in charts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-remove-gaps-in-charts/m-p/394318#M114544</link>
      <description>&lt;P&gt;Hi Vatsal,&lt;BR /&gt;
Actually, the data shown refers to days, not months. So at specific days of the year, certain events happened; I just want to show those, without the gaps. I'll try your query and let you know.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 21:00:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-remove-gaps-in-charts/m-p/394318#M114544</guid>
      <dc:creator>ADRIANODL</dc:creator>
      <dc:date>2018-09-27T21:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do I remove gaps in charts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-remove-gaps-in-charts/m-p/394319#M114545</link>
      <description>&lt;P&gt;Hi Vatsal,&lt;BR /&gt;
No luck, it groups things by month.  &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 28 Sep 2018 00:20:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-remove-gaps-in-charts/m-p/394319#M114545</guid>
      <dc:creator>ADRIANODL</dc:creator>
      <dc:date>2018-09-28T00:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do I remove gaps in charts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-remove-gaps-in-charts/m-p/394320#M114546</link>
      <description>&lt;P&gt;I did, it fills the gaps with bars, which is not what I want. Thanks though Vijeta!&lt;/P&gt;</description>
      <pubDate>Fri, 28 Sep 2018 00:20:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-remove-gaps-in-charts/m-p/394320#M114546</guid>
      <dc:creator>ADRIANODL</dc:creator>
      <dc:date>2018-09-28T00:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: How do I remove gaps in charts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-remove-gaps-in-charts/m-p/394321#M114547</link>
      <description>&lt;P&gt;this is what I'm looking for... sorry for the crappy chart but it gives you an idea &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/5836iE438DFCAA51B2B9D/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Sep 2018 01:34:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-remove-gaps-in-charts/m-p/394321#M114547</guid>
      <dc:creator>ADRIANODL</dc:creator>
      <dc:date>2018-09-28T01:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: How do I remove gaps in charts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-remove-gaps-in-charts/m-p/394322#M114548</link>
      <description>&lt;P&gt;Hi ADRIANODL,&lt;BR /&gt;
I think in my case it is working just by writing cont=false, nothing else is required. Can you tell me which Splunk version are you working on?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Sep 2018 03:50:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-remove-gaps-in-charts/m-p/394322#M114548</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2018-09-28T03:50:00Z</dc:date>
    </item>
  </channel>
</rss>

