<?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 do you use custom colors on a dashboard chart based on values rather than fields? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-you-use-custom-colors-on-a-dashboard-chart-based-on/m-p/309363#M19751</link>
    <description>&lt;P&gt;Thanks for your prompt response. But, It actually adding additional category of fields, rather than implying colors to the exiting fields.&lt;/P&gt;</description>
    <pubDate>Fri, 01 Dec 2017 16:44:11 GMT</pubDate>
    <dc:creator>itsmeveeram</dc:creator>
    <dc:date>2017-12-01T16:44:11Z</dc:date>
    <item>
      <title>How do you use custom colors on a dashboard chart based on values rather than fields?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-you-use-custom-colors-on-a-dashboard-chart-based-on/m-p/309361#M19749</link>
      <description>&lt;P&gt;I have a query which displays percentage of space used by couple of mounts for each of the hosts. I want my column chart bars to display colors based on values.&lt;/P&gt;

&lt;P&gt;For example, all the column chart bars with values less than 30 should be in green, between 31-70 should be in yellow and greater than 70 should be in red.&lt;/P&gt;

&lt;P&gt;I have gone through other related Splunk answers, but they are discussing on using custom chart colors based on Axis fields (Eg: charting.seriesColors / charting.fieldColors / eval conditions in SPL / etc). I'm expecting an answer which actually suggests displaying same color for all the bars with same values, irrespective of fields.&lt;/P&gt;

&lt;P&gt;Here is my Query:&lt;BR /&gt;
(host=wjb4stl260 OR host=wjb4stl261 OR host=wjb4stl262 OR host=wjb4stl263 OR host=wjb4stl365 OR host=wjb4stl366 OR host=wjb4stl367 OR host=wjb4stl368 OR host=CJB4STL365 OR host=CJB4STL366 OR host=WJB4STL62 OR host=WJB4STL67 OR host=WJB4STL68 OR host=WJB4STL69 OR host=WJB4STL72 OR host=WJB4STL73 OR host=CJB4STL60 OR host=CJB4STL61) (MountedOn="/tmp" OR MountedOn="/apps_01")  | dedup host, MountedOn | chart max(UsePct) by host, MountedOn &lt;/P&gt;

&lt;P&gt;Please advice.&lt;/P&gt;

&lt;P&gt;Thank you!&lt;/P&gt;

&lt;P&gt;Best,&lt;BR /&gt;
Veera&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2017 17:33:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-you-use-custom-colors-on-a-dashboard-chart-based-on/m-p/309361#M19749</guid>
      <dc:creator>itsmeveeram</dc:creator>
      <dc:date>2017-11-30T17:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: How do you use custom colors on a dashboard chart based on values rather than fields?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-you-use-custom-colors-on-a-dashboard-chart-based-on/m-p/309362#M19750</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I wanted to do the same thing once and came up with the following solution:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(host=wjb4stl260 OR host=wjb4stl261 OR host=wjb4stl262 OR host=wjb4stl263 OR host=wjb4stl365 OR host=wjb4stl366 OR host=wjb4stl367 OR host=wjb4stl368 OR host=CJB4STL365 OR host=CJB4STL366 OR host=WJB4STL62 OR host=WJB4STL67 OR host=WJB4STL68 OR host=WJB4STL69 OR host=WJB4STL72 OR host=WJB4STL73 OR host=CJB4STL60 OR host=CJB4STL61) (MountedOn="/tmp" OR MountedOn="/apps_01") | dedup host, MountedOn | chart max(UsePct) as max_use_pct by host, MountedOn
| eval status=case( 
max_use_pct  &amp;lt;= 30, "green",
max_use_pct  &amp;gt; 30 AND max_use_pct  &amp;lt;= 70, "yellow",
max_use_pct  &amp;gt; 70, "red")
| chart values(max_use_pct ) by host, status
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then select stacked mode in the visualisation format.&lt;BR /&gt;
You can then assign colours to the bars using the "green", "yellow" and "red" fields (that you can rename to anything more relevant if you want, like "low/medium/high disk usage for example") using charting.fieldColors for example.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2017 13:10:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-you-use-custom-colors-on-a-dashboard-chart-based-on/m-p/309362#M19750</guid>
      <dc:creator>damien_chillet</dc:creator>
      <dc:date>2017-12-01T13:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do you use custom colors on a dashboard chart based on values rather than fields?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-you-use-custom-colors-on-a-dashboard-chart-based-on/m-p/309363#M19751</link>
      <description>&lt;P&gt;Thanks for your prompt response. But, It actually adding additional category of fields, rather than implying colors to the exiting fields.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2017 16:44:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-you-use-custom-colors-on-a-dashboard-chart-based-on/m-p/309363#M19751</guid>
      <dc:creator>itsmeveeram</dc:creator>
      <dc:date>2017-12-01T16:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do you use custom colors on a dashboard chart based on values rather than fields?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-you-use-custom-colors-on-a-dashboard-chart-based-on/m-p/309364#M19752</link>
      <description>&lt;P&gt;I thought it would be okay if you only worry about the visual aspect, you can even hide the legend if you find it confusing!&lt;/P&gt;

&lt;P&gt;Eventually someone will post a solution using javascript later.&lt;/P&gt;

&lt;P&gt;Good luck and happy Splunking!&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2017 17:00:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-you-use-custom-colors-on-a-dashboard-chart-based-on/m-p/309364#M19752</guid>
      <dc:creator>damien_chillet</dc:creator>
      <dc:date>2017-12-01T17:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: How do you use custom colors on a dashboard chart based on values rather than fields?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-you-use-custom-colors-on-a-dashboard-chart-based-on/m-p/309365#M19753</link>
      <description>&lt;P&gt;Thank you, Damien!&lt;/P&gt;

&lt;P&gt;I'll try to explore any other ways to help with my use case, meanwhile.&lt;/P&gt;

&lt;P&gt;Happy Splunking!&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2017 17:11:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-you-use-custom-colors-on-a-dashboard-chart-based-on/m-p/309365#M19753</guid>
      <dc:creator>itsmeveeram</dc:creator>
      <dc:date>2017-12-01T17:11:39Z</dc:date>
    </item>
  </channel>
</rss>

