<?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: Legends in bar chart in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Legends-in-bar-chart/m-p/680994#M55763</link>
    <description>&lt;P&gt;Do you mean something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval static="Category"
| chart count by static category&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 18 Mar 2024 09:54:44 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2024-03-18T09:54:44Z</dc:date>
    <item>
      <title>Legends in bar chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Legends-in-bar-chart/m-p/680990#M55762</link>
      <description>&lt;P&gt;Hi, Im a novice to Splunk and i have a question regarding visualization.&lt;BR /&gt;&lt;BR /&gt;I have my query like this:&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;|...myBaseQuery
| chart c as "Count" by category&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This results in me only having one legend in my visualization, "Count". I was wondering if there's any way to get the all the values as a legend on the right (see image) ?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I realized this is possible when i also use the retailUnit in the chart command:&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;|...myBaseQuery
| chart c as "Count" by retailUnit category&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Then I get one label for each category (see image), but i want to achieve this without sorting on retailUnit.&lt;BR /&gt;&lt;BR /&gt;Is this possible?&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Skärmavbild 2024-03-18 kl. 10.18.55.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/29777iF99CC33F97F5A4CA/image-size/large?v=v2&amp;amp;px=999" role="button" title="Skärmavbild 2024-03-18 kl. 10.18.55.png" alt="Skärmavbild 2024-03-18 kl. 10.18.55.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Skärmavbild 2024-03-18 kl. 10.12.47.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/29776iEDEF42B9186C7A1B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Skärmavbild 2024-03-18 kl. 10.12.47.png" alt="Skärmavbild 2024-03-18 kl. 10.12.47.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2024 09:26:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Legends-in-bar-chart/m-p/680990#M55762</guid>
      <dc:creator>erkin</dc:creator>
      <dc:date>2024-03-18T09:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: Legends in bar chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Legends-in-bar-chart/m-p/680994#M55763</link>
      <description>&lt;P&gt;Do you mean something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval static="Category"
| chart count by static category&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 18 Mar 2024 09:54:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Legends-in-bar-chart/m-p/680994#M55763</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-03-18T09:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: Legends in bar chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Legends-in-bar-chart/m-p/680996#M55764</link>
      <description>&lt;P&gt;Yes! Exactly what I need, thank you.&lt;BR /&gt;&lt;BR /&gt;Now the only issue I'm having is that I'm no longer available to sort the bar chart in descending order. Earlier I used to do | sort -count, but that doesn't seem to work using static&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2024 09:59:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Legends-in-bar-chart/m-p/680996#M55764</guid>
      <dc:creator>erkin</dc:creator>
      <dc:date>2024-03-18T09:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: Legends in bar chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Legends-in-bar-chart/m-p/681001#M55766</link>
      <description>&lt;P&gt;Yes, chart will sort the columns by name. In order to get around this, you need to use transpose&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval static="Category"
| chart count by static category
| transpose header_field=static column_name=category
| sort - Category
| transpose header_field=category column_name=static&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 18 Mar 2024 10:13:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Legends-in-bar-chart/m-p/681001#M55766</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-03-18T10:13:56Z</dc:date>
    </item>
  </channel>
</rss>

