<?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: Not able to draw bar chart in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Not-able-to-draw-bar-chart/m-p/379601#M24829</link>
    <description>&lt;P&gt;Just add &lt;CODE&gt;| table Type Count&lt;/CODE&gt; to change the order of the fields; here is a run-anywhere example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval raw="Type=Allowed,Count=11 Type=Blocked,Count=12" 
| makemv raw 
| mvexpand raw 
| rename raw As _raw 
| kv
| fields - _*
| table Type Count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 06 Jul 2019 21:01:08 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2019-07-06T21:01:08Z</dc:date>
    <item>
      <title>Not able to draw bar chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Not-able-to-draw-bar-chart/m-p/379599#M24827</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;&amp;lt;|script python afiStatistics afiStats &amp;gt;&lt;BR /&gt;
Above query Result is following output:&lt;/P&gt;

&lt;P&gt;Type                Count&lt;BR /&gt;
Allowed             11&lt;BR /&gt;
Blocked              12&lt;/P&gt;

&lt;P&gt;With the above query i want create Bar chart, But it is not able to draw the chart&lt;/P&gt;

&lt;P&gt;Expected  output&lt;BR /&gt;
         |&lt;BR /&gt;
Type|--------------------------------------------&lt;BR /&gt;
         |--------------------------&lt;BR /&gt;
         |&lt;BR /&gt;
                   Count&lt;/P&gt;

&lt;P&gt;advance Thanks,&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2019 12:55:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Not-able-to-draw-bar-chart/m-p/379599#M24827</guid>
      <dc:creator>uppukumar</dc:creator>
      <dc:date>2019-07-05T12:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to draw bar chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Not-able-to-draw-bar-chart/m-p/379600#M24828</link>
      <description>&lt;P&gt;Hey Uppukumar!&lt;/P&gt;

&lt;P&gt;Let me know if this works for you:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...BASE SEARCH...
| table Type Count 
| chart values(Count) AS Count by Type 
| sort - Count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Make sure the "Bar Chart" is selected as your visualization type, and your data should display the way you described. &lt;/P&gt;

&lt;P&gt;Since the count is already aggregated in your data, the &lt;CODE&gt;values&lt;/CODE&gt; function should work for you. &lt;/P&gt;

&lt;P&gt;If you would prefer aggregate your data or chart it in a different way, refer to the "Stats function options" section of the Splunk chart documentation.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.3.0/SearchReference/Chart"&gt;https://docs.splunk.com/Documentation/Splunk/7.3.0/SearchReference/Chart&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Let me know if you have any problems!&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2019 18:29:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Not-able-to-draw-bar-chart/m-p/379600#M24828</guid>
      <dc:creator>rbechtold</dc:creator>
      <dc:date>2019-07-05T18:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to draw bar chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Not-able-to-draw-bar-chart/m-p/379601#M24829</link>
      <description>&lt;P&gt;Just add &lt;CODE&gt;| table Type Count&lt;/CODE&gt; to change the order of the fields; here is a run-anywhere example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval raw="Type=Allowed,Count=11 Type=Blocked,Count=12" 
| makemv raw 
| mvexpand raw 
| rename raw As _raw 
| kv
| fields - _*
| table Type Count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 06 Jul 2019 21:01:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Not-able-to-draw-bar-chart/m-p/379601#M24829</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-07-06T21:01:08Z</dc:date>
    </item>
  </channel>
</rss>

