<?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 X axis based on the value of legends. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Sort-X-axis-based-on-the-value-of-legends/m-p/635102#M220651</link>
    <description>&lt;P&gt;Thanks. But now legend values not in sorted order.&amp;nbsp; It is 2020, 2021, 2020 etc..But we need 2020 2020 2021.&lt;/P&gt;</description>
    <pubDate>Mon, 20 Mar 2023 09:48:10 GMT</pubDate>
    <dc:creator>Kirthika</dc:creator>
    <dc:date>2023-03-20T09:48:10Z</dc:date>
    <item>
      <title>Sort X axis based on the value of legends?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sort-X-axis-based-on-the-value-of-legends/m-p/635084#M220641</link>
      <description>&lt;P&gt;I want X axis to be follow the same way as legend order.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2023 14:59:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sort-X-axis-based-on-the-value-of-legends/m-p/635084#M220641</guid>
      <dc:creator>Kirthika</dc:creator>
      <dc:date>2023-03-20T14:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: Sort X axis based on the value of legends.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sort-X-axis-based-on-the-value-of-legends/m-p/635094#M220645</link>
      <description>&lt;P&gt;You have 3 things in the chart: the x-axis; the y-axis; and, the series. The legend applies to the series not the axis.&lt;/P&gt;&lt;P&gt;Please share your SPL and clarify what you want the legend to show&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2023 08:29:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sort-X-axis-based-on-the-value-of-legends/m-p/635094#M220645</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-03-20T08:29:56Z</dc:date>
    </item>
    <item>
      <title>Re: Sort X axis based on the value of legends.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sort-X-axis-based-on-the-value-of-legends/m-p/635098#M220648</link>
      <description>&lt;P&gt;Sort x axis&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2023 10:19:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sort-X-axis-based-on-the-value-of-legends/m-p/635098#M220648</guid>
      <dc:creator>Kirthika</dc:creator>
      <dc:date>2023-03-20T10:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: Sort X axis based on the value of legends.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sort-X-axis-based-on-the-value-of-legends/m-p/635101#M220650</link>
      <description>&lt;P&gt;The legend is in the order of the series in the table. Chart tries to be helpful by putting these in a sorted order. In order to work against this, you have to do a couple of tricks. Try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| chart count(Device_ID) over latestversion by Final useother=f
| untable latestversion Final count
| where count &amp;gt; 0
| eval Final=latestversion."!".Final
| xyseries latestversion Final count
| transpose 0 column_name=Final header_field=latestversion
| eval Final=mvindex(split(Final,"!"),1)
| transpose 0 column_name=latestversion header_field=Final&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 20 Mar 2023 09:42:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sort-X-axis-based-on-the-value-of-legends/m-p/635101#M220650</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-03-20T09:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: Sort X axis based on the value of legends.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sort-X-axis-based-on-the-value-of-legends/m-p/635102#M220651</link>
      <description>&lt;P&gt;Thanks. But now legend values not in sorted order.&amp;nbsp; It is 2020, 2021, 2020 etc..But we need 2020 2020 2021.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2023 09:48:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sort-X-axis-based-on-the-value-of-legends/m-p/635102#M220651</guid>
      <dc:creator>Kirthika</dc:creator>
      <dc:date>2023-03-20T09:48:10Z</dc:date>
    </item>
    <item>
      <title>Re: Sort X axis based on the value of legends.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sort-X-axis-based-on-the-value-of-legends/m-p/635103#M220652</link>
      <description>&lt;LI-CODE lang="markup"&gt;| chart count(Device_ID) over latestversion by Final useother=f
| untable latestversion Final count
| where count &amp;gt; 0
| eval latestversion=Final."!".latestversion
| xyseries latestversion Final count
| eval latestversion=mvindex(split(latestversion,"!"),1)&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 20 Mar 2023 09:53:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sort-X-axis-based-on-the-value-of-legends/m-p/635103#M220652</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-03-20T09:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: Sort X axis based on the value of legends.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sort-X-axis-based-on-the-value-of-legends/m-p/635104#M220653</link>
      <description>&lt;P&gt;Thank you. It is working perfectly&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2023 09:54:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sort-X-axis-based-on-the-value-of-legends/m-p/635104#M220653</guid>
      <dc:creator>Kirthika</dc:creator>
      <dc:date>2023-03-20T09:54:48Z</dc:date>
    </item>
  </channel>
</rss>

