<?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 the legend's display from chart in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Sort-the-legend-s-display-from-chart/m-p/32021#M6656</link>
    <description>&lt;P&gt;I don't really understand... Don't you just have to write something like that?&lt;BR /&gt;
==&amp;gt; "| fields 1003, 1002, 1001"&lt;/P&gt;

&lt;P&gt;Unless you cannot know in advance how many results you will have... For example "1001 1002 1003" and later "2001 2002 2003 2004 2005"... In this case (and know I assume that this is your situation), I don't know how to do...&lt;/P&gt;

&lt;P&gt;nugetchar&lt;/P&gt;</description>
    <pubDate>Thu, 14 Feb 2013 12:58:28 GMT</pubDate>
    <dc:creator>nugetchar</dc:creator>
    <dc:date>2013-02-14T12:58:28Z</dc:date>
    <item>
      <title>Sort the legend's display from chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sort-the-legend-s-display-from-chart/m-p/32020#M6655</link>
      <description>&lt;P&gt;Hi everyone!&lt;/P&gt;

&lt;P&gt;I would like to display several areas (stacked) or columns in a specific order. Here is my charting command :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| chart avg(countUsers) as avgCountUsers over Time by ID
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My IDs are like 1001, 1002, 1003 ... 2001, 2002 ...&lt;/P&gt;

&lt;P&gt;For example, the average corresponding to 1001 is above 1002, which is above 1003, and I want to reverse the areas/columns so that I display 1001 first, then 1002 on top of it, etc.&lt;/P&gt;

&lt;P&gt;I tried the &lt;CODE&gt;sort&lt;/CODE&gt; command and the &lt;CODE&gt;reverse&lt;/CODE&gt; one, but my chart remained the same, maybe I haven't used it correctly. &lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;

&lt;P&gt;Thanks in advance!&lt;/P&gt;

&lt;P&gt;BlueLychee.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2013 11:12:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sort-the-legend-s-display-from-chart/m-p/32020#M6655</guid>
      <dc:creator>BDAS</dc:creator>
      <dc:date>2013-02-14T11:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: Sort the legend's display from chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sort-the-legend-s-display-from-chart/m-p/32021#M6656</link>
      <description>&lt;P&gt;I don't really understand... Don't you just have to write something like that?&lt;BR /&gt;
==&amp;gt; "| fields 1003, 1002, 1001"&lt;/P&gt;

&lt;P&gt;Unless you cannot know in advance how many results you will have... For example "1001 1002 1003" and later "2001 2002 2003 2004 2005"... In this case (and know I assume that this is your situation), I don't know how to do...&lt;/P&gt;

&lt;P&gt;nugetchar&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2013 12:58:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sort-the-legend-s-display-from-chart/m-p/32021#M6656</guid>
      <dc:creator>nugetchar</dc:creator>
      <dc:date>2013-02-14T12:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: Sort the legend's display from chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sort-the-legend-s-display-from-chart/m-p/32022#M6657</link>
      <description>&lt;P&gt;Thanks for answering so fast!&lt;/P&gt;

&lt;P&gt;Yes, it works fine with | fields 1003 1002 1001 but I want my search to be generic in case I would receive other IDs (ex: 4001, 4002 ...)&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2013 13:33:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sort-the-legend-s-display-from-chart/m-p/32022#M6657</guid>
      <dc:creator>BDAS</dc:creator>
      <dc:date>2013-02-14T13:33:01Z</dc:date>
    </item>
    <item>
      <title>Re: Sort the legend's display from chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sort-the-legend-s-display-from-chart/m-p/32023#M6658</link>
      <description>&lt;P&gt;Looks like the chart module just creates the legend entry when it gets an entry so you just need to sort by ID prior to piping it the chart.&lt;/P&gt;

&lt;P&gt;| sort ID | chart avg(countUsers) as avgCountUsers over Time by ID&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2013 12:40:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sort-the-legend-s-display-from-chart/m-p/32023#M6658</guid>
      <dc:creator>uksysadmins</dc:creator>
      <dc:date>2013-06-14T12:40:12Z</dc:date>
    </item>
  </channel>
</rss>

