<?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 to change the lables of x axis of a bar graph in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-change-the-lables-of-x-axis-of-a-bar-graph/m-p/580552#M202257</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have to plot a bar graph in which duration in hours will be in x axis and number of tasks will be in y axis. I want to specify the label of x axis as 0-1(hr), 1-2(hr), 2-3(hr),.... Can anyone please help me in doing this.&lt;/P&gt;</description>
    <pubDate>Tue, 11 Jan 2022 06:54:16 GMT</pubDate>
    <dc:creator>anooshac</dc:creator>
    <dc:date>2022-01-11T06:54:16Z</dc:date>
    <item>
      <title>how to change the lables of x axis of a bar graph</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-change-the-lables-of-x-axis-of-a-bar-graph/m-p/580552#M202257</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have to plot a bar graph in which duration in hours will be in x axis and number of tasks will be in y axis. I want to specify the label of x axis as 0-1(hr), 1-2(hr), 2-3(hr),.... Can anyone please help me in doing this.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jan 2022 06:54:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-change-the-lables-of-x-axis-of-a-bar-graph/m-p/580552#M202257</guid>
      <dc:creator>anooshac</dc:creator>
      <dc:date>2022-01-11T06:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to change the lables of x axis of a bar graph</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-change-the-lables-of-x-axis-of-a-bar-graph/m-p/580555#M202259</link>
      <description>&lt;P&gt;bin span=1 will do this for you&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults count=20
| eval duration=random() % 20 
| eval count=random() % 20
| stats sum(count) as count by duration
| sort 0 duration
| makecontinuous duration
| bin duration span=1&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 11 Jan 2022 07:39:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-change-the-lables-of-x-axis-of-a-bar-graph/m-p/580555#M202259</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-01-11T07:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to change the lables of x axis of a bar graph</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-change-the-lables-of-x-axis-of-a-bar-graph/m-p/580716#M202298</link>
      <description>&lt;P&gt;| eval duration=(TASK_DURATION)/3600000|chart distinct_count(TASK_NUM) as task by duration| makecontinuous duration | bin duration span=1&lt;/P&gt;&lt;P&gt;I have used the query like this and i'm getting the following results. &lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="This is the result that i got" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/17531iC711B61843E9388E/image-size/large?v=v2&amp;amp;px=999" role="button" title="2022-01-12_10h26_21 (2).png" alt="This is the result that i got" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;This is the result that i got&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 05:00:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-change-the-lables-of-x-axis-of-a-bar-graph/m-p/580716#M202298</guid>
      <dc:creator>anooshac</dc:creator>
      <dc:date>2022-01-12T05:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to change the lables of x axis of a bar graph</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-change-the-lables-of-x-axis-of-a-bar-graph/m-p/580735#M202307</link>
      <description>&lt;P&gt;Use floor on the division otherwise you are charting by fractions of hours.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval duration=floor((TASK_DURATION)/3600000)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 12 Jan 2022 08:29:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-change-the-lables-of-x-axis-of-a-bar-graph/m-p/580735#M202307</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-01-12T08:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: how to change the lables of x axis of a bar graph</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-change-the-lables-of-x-axis-of-a-bar-graph/m-p/580756#M202315</link>
      <description>&lt;P&gt;Thank you so much!! It is working fine.. I have one small query, if we have to make interval as 0-2, 2-4, 4-6... i have to change span=2 right? i tried and i am getting repeated values in the table.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 10:17:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-change-the-lables-of-x-axis-of-a-bar-graph/m-p/580756#M202315</guid>
      <dc:creator>anooshac</dc:creator>
      <dc:date>2022-01-12T10:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to change the lables of x axis of a bar graph</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-change-the-lables-of-x-axis-of-a-bar-graph/m-p/580761#M202318</link>
      <description>&lt;P&gt;You would have do it slightly differently&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults count=20
| eval duration=random() % 20 
| eval count=random() % 20
``` this bin groups duration in 2's for the stats - note the s after the 2 (this keeps the duration as numbers rather than strings of ranges) ```
| bin duration span=2s
| stats sum(count) as count by duration
| sort 0 duration
| makecontinuous duration 
``` this bin converts the duration to a string range - note the removal of the s ```
| bin duration span=2&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 12 Jan 2022 10:43:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-change-the-lables-of-x-axis-of-a-bar-graph/m-p/580761#M202318</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-01-12T10:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: how to change the lables of x axis of a bar graph</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-change-the-lables-of-x-axis-of-a-bar-graph/m-p/580877#M202376</link>
      <description>&lt;P&gt;Thank you so much!&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jan 2022 04:18:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-change-the-lables-of-x-axis-of-a-bar-graph/m-p/580877#M202376</guid>
      <dc:creator>anooshac</dc:creator>
      <dc:date>2022-01-13T04:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: how to change the lables of x axis of a bar graph</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-change-the-lables-of-x-axis-of-a-bar-graph/m-p/580936#M202389</link>
      <description>&lt;P&gt;I have one doubt.. need one more help from you.. The x axis is showing ranges that are too high.. for example 200-202 which doesn't have data in the y axis. How can i limit the range of x axis?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jan 2022 12:35:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-change-the-lables-of-x-axis-of-a-bar-graph/m-p/580936#M202389</guid>
      <dc:creator>anooshac</dc:creator>
      <dc:date>2022-01-13T12:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: how to change the lables of x axis of a bar graph</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-change-the-lables-of-x-axis-of-a-bar-graph/m-p/580943#M202391</link>
      <description>&lt;P&gt;Take out the makecontinuous&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jan 2022 13:15:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-change-the-lables-of-x-axis-of-a-bar-graph/m-p/580943#M202391</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-01-13T13:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: how to change the lables of x axis of a bar graph</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-change-the-lables-of-x-axis-of-a-bar-graph/m-p/581703#M202644</link>
      <description>&lt;P&gt;Thank you..&lt;/P&gt;&lt;P&gt;Since the bar graph is having a lot of values in x axis i'm trying to limit the values. I'm trying to group the values into 3. One which has duration less than 15, second one having duration between 15 to 25 and last one having duration greater than 25.&lt;/P&gt;&lt;PRE&gt;        | eval red = if(duration&amp;gt;25,duration,0)
        | eval yellow = if(duration&amp;lt;=25 AND duration&amp;gt;15,duration,0)
        | eval green = if(duration&amp;lt;=15, duration, 0)
        &lt;/PRE&gt;&lt;P&gt;&amp;nbsp; I have tried like this but i think this is not how its done. Do you have any idea on this. Can you please help me on this.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 16:27:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-change-the-lables-of-x-axis-of-a-bar-graph/m-p/581703#M202644</guid>
      <dc:creator>anooshac</dc:creator>
      <dc:date>2022-01-19T16:27:25Z</dc:date>
    </item>
  </channel>
</rss>

