<?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: Sort stacked  bar chart columns based on a value in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Sort-stacked-bar-chart-columns-based-on-a-value/m-p/534157#M150963</link>
    <description>&lt;P&gt;What x-axis?&amp;nbsp; The original question had a table, not a graph, so why is there now a graph?&lt;/P&gt;&lt;P&gt;Let's start over.&amp;nbsp; Please describe at length what data you have and what you would like the result of a query to look like.&amp;nbsp; Explain any transformations necessary.&lt;/P&gt;</description>
    <pubDate>Sun, 27 Dec 2020 21:45:40 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2020-12-27T21:45:40Z</dc:date>
    <item>
      <title>Sort stacked  bar chart columns based on a value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sort-stacked-bar-chart-columns-based-on-a-value/m-p/534146#M150957</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm struggling with sorting bar chart columns based on a time value.&lt;BR /&gt;&lt;BR /&gt;I have the following in my search:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| chart last(duration) as duration over run_id by task_id&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;and I get the following table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;run_id	task_1		 task_2	 	task_3	 	task_4		 
1	14.55000000	1.60000000	11.55000000	1.78333333
2	13.93333333	2.73333333	13.55000000	1.91666667&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in the stacked chart visualization the tasks are showing from top to bottom in the order of the tasks column (first task_1 then task_2, etc).&lt;BR /&gt;&lt;BR /&gt;i want to sort the task_id colums based on a value (start time) which i have on the initial search (pre charting) for each of the tasks.&lt;BR /&gt;&lt;BR /&gt;is it possible to do that?&lt;BR /&gt;&lt;BR /&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Sun, 27 Dec 2020 15:50:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sort-stacked-bar-chart-columns-based-on-a-value/m-p/534146#M150957</guid>
      <dc:creator>D_D</dc:creator>
      <dc:date>2020-12-27T15:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: Sort stacked  bar chart columns based on a value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sort-stacked-bar-chart-columns-based-on-a-value/m-p/534148#M150958</link>
      <description>&lt;P&gt;Try replacing the &lt;FONT face="courier new,courier"&gt;chart&lt;/FONT&gt; command with this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval _time = starttime
| timechart last(duration) as duration by task_id&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Dec 2020 15:27:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sort-stacked-bar-chart-columns-based-on-a-value/m-p/534148#M150958</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-12-27T15:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: Sort stacked  bar chart columns based on a value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sort-stacked-bar-chart-columns-based-on-a-value/m-p/534150#M150960</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;appreciate your assistance,&lt;/P&gt;&lt;P&gt;when i change to your suggestion there is two issues:&lt;/P&gt;&lt;P&gt;1) The columns are still not sorted by starttime field.&lt;/P&gt;&lt;P&gt;2) The x-axis is now by time and not by task_id.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Dec 2020 15:37:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sort-stacked-bar-chart-columns-based-on-a-value/m-p/534150#M150960</guid>
      <dc:creator>D_D</dc:creator>
      <dc:date>2020-12-27T15:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: Sort stacked  bar chart columns based on a value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sort-stacked-bar-chart-columns-based-on-a-value/m-p/534157#M150963</link>
      <description>&lt;P&gt;What x-axis?&amp;nbsp; The original question had a table, not a graph, so why is there now a graph?&lt;/P&gt;&lt;P&gt;Let's start over.&amp;nbsp; Please describe at length what data you have and what you would like the result of a query to look like.&amp;nbsp; Explain any transformations necessary.&lt;/P&gt;</description>
      <pubDate>Sun, 27 Dec 2020 21:45:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sort-stacked-bar-chart-columns-based-on-a-value/m-p/534157#M150963</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-12-27T21:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: Sort stacked  bar chart columns based on a value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sort-stacked-bar-chart-columns-based-on-a-value/m-p/534176#M150969</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Okay, so here is the raw data by fields:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;run_id:
task_name:
starttime:
finishtime:&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;I want to create a stack bar chart where in each bar i can see all the task_name fields for all run_id, and for each task_name i want to see his duration (calculated by finishtime-startime).&lt;BR /&gt;&lt;BR /&gt;i achieved that by getting the following table and displaying in as a bar chart:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;run_id	task_1		 task_2	 	task_3	 	task_4		 
1	14.55000000	1.60000000	11.55000000	1.78333333
2	13.93333333	2.73333333	13.55000000	1.91666667&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;on the current display, each bar contains 4 tasks by the order of them is (task_1 on the top, then task_2 bellow him and on the bottom there is task_4)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;current bar char stacked:
----------------
|              | &amp;lt;- task_1
|              | &amp;lt;- task_2
|              | &amp;lt;- task_3
|              | &amp;lt;- task_4&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;i want to rearrange that order by each task starttime (do task with the lowest start time should be at the bottom), so i believe i can do that by rearrange the columns.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;bar char stacked i want to have:
---------------
|              | &amp;lt;- task with highest start time
|              | &amp;lt;- task_2
|              | &amp;lt;- task_3
|              | &amp;lt;- task with lowest start time&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;But i still want the chart bar to be have x axis (run_in), y-axis(duration, using axis might be the wrong word, but i want duration over/by task_id for the chart display.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Dec 2020 07:02:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sort-stacked-bar-chart-columns-based-on-a-value/m-p/534176#M150969</guid>
      <dc:creator>D_D</dc:creator>
      <dc:date>2020-12-28T07:02:05Z</dc:date>
    </item>
  </channel>
</rss>

