<?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: how to show different colors for each bar in bar chart in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-show-different-colors-for-each-bar-in-bar-chart/m-p/377129#M24684</link>
    <description>&lt;P&gt;@niketnilay yes the color changes  but the visualization doesn't look from top to bottom .&lt;/P&gt;</description>
    <pubDate>Thu, 18 Apr 2019 08:26:20 GMT</pubDate>
    <dc:creator>Nadhiyaa</dc:creator>
    <dc:date>2019-04-18T08:26:20Z</dc:date>
    <item>
      <title>how to show different colors for each bar in bar chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-show-different-colors-for-each-bar-in-bar-chart/m-p/377123#M24678</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;|query
| stats count by app_status| eventstats sum(count) as totalCount 
| eval percentage=round((count/totalCount)*100,3)
| fields - count totalCount
| chart max(percentage) by app_status
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;i want to show results in bar chart. with above query i am able to see the bar chart, but all bars have same color. is there way to show different colors for each bar? thanks in advance&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2018 21:11:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-show-different-colors-for-each-bar-in-bar-chart/m-p/377123#M24678</guid>
      <dc:creator>ramki1459</dc:creator>
      <dc:date>2018-06-07T21:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: how to show different colors for each bar in bar chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-show-different-colors-for-each-bar-in-bar-chart/m-p/377124#M24679</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|query
 | stats count by app_status| eventstats sum(count) as totalCount 
 | eval percentage=round((count/totalCount)*100,3)
 | fields - count totalCount | eval temp=app_status
 | chart max(percentage) by t app_status temp
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Jun 2018 21:33:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-show-different-colors-for-each-bar-in-bar-chart/m-p/377124#M24679</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-06-07T21:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: how to show different colors for each bar in bar chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-show-different-colors-for-each-bar-in-bar-chart/m-p/377125#M24680</link>
      <description>&lt;P&gt;@ramki1459, try the following search.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;yourBaseSearch&amp;gt;
| top 0 app_status showcount=f
| transpose 0 header_field="app_status" column_name="app_status" 
| search component!="_*" 
| chart max(percentage) by app_status
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;PS: I have used &lt;CODE&gt;limit=0&lt;/CODE&gt; to show maximum allowed fields. However, you can use specific number if you know what could be the upper limit for unique app_status field values. The following run anywhere example based on Splunk's _internal index shows only 5 of all the components.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal sourcetype=splunkd log_level!="INFO" component!="Metrics" OR component!="PeriodicHealthChecker" 
| top 5 component showcount=f 
| transpose 5 header_field="component" column_name="component" 
| search component!="_*"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please try out and confirm!&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jun 2018 07:15:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-show-different-colors-for-each-bar-in-bar-chart/m-p/377125#M24680</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-06-08T07:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: how to show different colors for each bar in bar chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-show-different-colors-for-each-bar-in-bar-chart/m-p/377126#M24681</link>
      <description>&lt;P&gt;thank you so much. it worked &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jun 2018 17:08:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-show-different-colors-for-each-bar-in-bar-chart/m-p/377126#M24681</guid>
      <dc:creator>ramki1459</dc:creator>
      <dc:date>2018-06-08T17:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: how to show different colors for each bar in bar chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-show-different-colors-for-each-bar-in-bar-chart/m-p/377127#M24682</link>
      <description>&lt;P&gt;@niketnilay When i try the bars are not in the descendingly sorted  . How to fix that&lt;/P&gt;</description>
      <pubDate>Sun, 14 Apr 2019 07:52:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-show-different-colors-for-each-bar-in-bar-chart/m-p/377127#M24682</guid>
      <dc:creator>Nadhiyaa</dc:creator>
      <dc:date>2019-04-14T07:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: how to show different colors for each bar in bar chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-show-different-colors-for-each-bar-in-bar-chart/m-p/377128#M24683</link>
      <description>&lt;P&gt;@Nadhiyaa what is the query you are using. The &lt;CODE&gt;top&lt;/CODE&gt; command in the above example applies reverse sorting based on volume for a field. So this is supposed to work. Did you try out the run anywhere example based on Splunk's _internal index?&lt;/P&gt;</description>
      <pubDate>Sun, 14 Apr 2019 09:00:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-show-different-colors-for-each-bar-in-bar-chart/m-p/377128#M24683</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-04-14T09:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: how to show different colors for each bar in bar chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-show-different-colors-for-each-bar-in-bar-chart/m-p/377129#M24684</link>
      <description>&lt;P&gt;@niketnilay yes the color changes  but the visualization doesn't look from top to bottom .&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2019 08:26:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-show-different-colors-for-each-bar-in-bar-chart/m-p/377129#M24684</guid>
      <dc:creator>Nadhiyaa</dc:creator>
      <dc:date>2019-04-18T08:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: how to show different colors for each bar in bar chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-show-different-colors-for-each-bar-in-bar-chart/m-p/377130#M24685</link>
      <description>&lt;P&gt;For me a Column or Bar chart works fine not sure which visualization you are using and what is your query. I have changed the query to stats to see if this is what you are using.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal sourcetype=splunkd
| stats count by log_level 
| eventstats sum(count) as totalCount 
| eval percentage=round((count/totalCount)*100,3) 
| fields - count totalCount 
| chart max(percentage) as "Percentage (max)" by log_level
| sort 0 - "Percentage (max)"
| transpose 0 header_field=log_level column_name=log_level
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If this does not work kindly post the query you are using as a new question!&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2019 21:07:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/how-to-show-different-colors-for-each-bar-in-bar-chart/m-p/377130#M24685</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-04-18T21:07:28Z</dc:date>
    </item>
  </channel>
</rss>

