<?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: issue related to coloring in pie based on  application status in piechart in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/issue-related-to-coloring-in-pie-based-on-application-status-in/m-p/460132#M30194</link>
    <description>&lt;P&gt;@venky1544 I dont think Pie Chart is the right visualization for your use case. Pie chart shows slices based on percentage of data. In your case Slices and Colors of slices will have no significance.&lt;/P&gt;

&lt;P&gt;You should be looking for &lt;/P&gt;

&lt;P&gt;1) either built in Single Value Visualization with Trellis Layout (Splunk 6.6 or higher) and color based on Status. Following are some of the answers for reference:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/590581/refresh-data-in-table-by-collecting-token-on-click.html"&gt;https://answers.splunk.com/answers/590581/refresh-data-in-table-by-collecting-token-on-click.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/470029/how-to-edit-my-search-in-order-to-assign-colors-to.html"&gt;https://answers.splunk.com/answers/470029/how-to-edit-my-search-in-order-to-assign-colors-to.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;or&lt;BR /&gt;
2) Status Indicator Custom Visualization with Trellis Layout with color and icon based on Status. Refer to following answers with slightly different use cases: &lt;A href="https://answers.splunk.com/answers/613370/status-indicator-app-how-do-i-access-search-result.html"&gt;https://answers.splunk.com/answers/613370/status-indicator-app-how-do-i-access-search-result.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/671398/how-to-make-trellis-smaller-in-the-dashboard-using.html"&gt;https://answers.splunk.com/answers/671398/how-to-make-trellis-smaller-in-the-dashboard-using.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/606353/dashboard-help-1.html"&gt;https://answers.splunk.com/answers/606353/dashboard-help-1.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;PS: If you really need Pie Chart you would need to have Status in the Legend of each Pie label and possibly color the Legend based on Up or Down with Slices showing data could be plotted. But that has to be done through Simple XML JS extension as Legend text would need to be parsed and Style would need to be overridden accordingly. Following is an answer based on CSS using series color but only for idea on how color can be applied: &lt;A href="https://answers.splunk.com/answers/615999/pie-chart-vs-label-colors.html"&gt;https://answers.splunk.com/answers/615999/pie-chart-vs-label-colors.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Aug 2019 03:47:15 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2019-08-29T03:47:15Z</dc:date>
    <item>
      <title>issue related to coloring in pie based on  application status in piechart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/issue-related-to-coloring-in-pie-based-on-application-status-in/m-p/460121#M30183</link>
      <description>&lt;P&gt;Hello everyone&lt;/P&gt;

&lt;P&gt;i have an issue in pie chart creation for the below dataset&lt;/P&gt;

&lt;P&gt;Application|Status&lt;BR /&gt;
app1:green&lt;BR /&gt;
app2:green&lt;BR /&gt;
app3:red&lt;BR /&gt;
app4:green&lt;/P&gt;

&lt;P&gt;Basically when i run the query &lt;STRONG&gt;index="test_data"  |chart count by Application,Status&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;i get a piechart with default 4 pie each having its own color and application name However i need the color in the pie according to the  status and the application name. i have tried using the settings in XML chart  like charting.fieldColors and charting.seriesColors&lt;/P&gt;

&lt;P&gt;However nothing is working at the moment any help is greatly appreciated &lt;/P&gt;

&lt;P&gt;Thanks&lt;BR /&gt;
VKY&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 00:57:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/issue-related-to-coloring-in-pie-based-on-application-status-in/m-p/460121#M30183</guid>
      <dc:creator>venky1544</dc:creator>
      <dc:date>2019-08-23T00:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: issue related to coloring in pie based on  application status in piechart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/issue-related-to-coloring-in-pie-based-on-application-status-in/m-p/460122#M30184</link>
      <description>&lt;P&gt;Hi Venky,&lt;/P&gt;

&lt;P&gt;Did you try something like (or change the "app:green" by the name of your value in your pie chart): &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;/search&amp;gt;
...
    &amp;lt;option name="charting.fieldColors"&amp;gt;{"app1:green":0x12920A,"app2:green":0x12920A,"app3:red":0xFF9900,"app3:green":0x12920A}&amp;lt;/option&amp;gt;
...
&amp;lt;/chart&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;if this does not work, what are the names of the values in the pie chart?&lt;/P&gt;

&lt;P&gt;Best regards,&lt;BR /&gt;
Adrian&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 10:08:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/issue-related-to-coloring-in-pie-based-on-application-status-in/m-p/460122#M30184</guid>
      <dc:creator>Adrian_ftx</dc:creator>
      <dc:date>2019-08-23T10:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: issue related to coloring in pie based on  application status in piechart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/issue-related-to-coloring-in-pie-based-on-application-status-in/m-p/460123#M30185</link>
      <description>&lt;P&gt;Hi Venky,&lt;/P&gt;

&lt;P&gt;Have you found a solution to your problem?&lt;/P&gt;

&lt;P&gt;Best regards,&lt;BR /&gt;
Adrian&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2019 12:56:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/issue-related-to-coloring-in-pie-based-on-application-status-in/m-p/460123#M30185</guid>
      <dc:creator>Adrian_ftx</dc:creator>
      <dc:date>2019-08-26T12:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: issue related to coloring in pie based on  application status in piechart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/issue-related-to-coloring-in-pie-based-on-application-status-in/m-p/460124#M30186</link>
      <description>&lt;P&gt;Why not use just &lt;CODE&gt;| stats count by status&lt;/CODE&gt;? This will give you the expected visual result (green/red) without the messy app names floating around. with a big number of apps the UX will be a bit awkward.&lt;BR /&gt;
If you still need to know which app is in which slice (green or red) you ca use contextual drill downs within a dashboard to show you the list of apps in  tidy table manner. &lt;/P&gt;

&lt;P&gt;More information on dashboard drill downs:&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Viz/DrilldownIntro"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Viz/DrilldownIntro&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2019 13:06:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/issue-related-to-coloring-in-pie-based-on-application-status-in/m-p/460124#M30186</guid>
      <dc:creator>diogofgm</dc:creator>
      <dc:date>2019-08-26T13:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: issue related to coloring in pie based on  application status in piechart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/issue-related-to-coloring-in-pie-based-on-application-status-in/m-p/460125#M30187</link>
      <description>&lt;P&gt;Hi Adrian&lt;BR /&gt;
Apologies for the late revert &lt;/P&gt;

&lt;P&gt;My data is in the below format i tried your above suggestion it didn't work for me &lt;/P&gt;

&lt;P&gt;Application Status&lt;BR /&gt;
App1    Red&lt;BR /&gt;
App2    Green&lt;BR /&gt;
App3    Green&lt;BR /&gt;
App4    Red&lt;BR /&gt;
App5    Green&lt;/P&gt;

&lt;P&gt;{"App1:Red":#FF0000,"App2:green":#00FF00,"App3:Green":#00FF00,"app4:Red":#FF0000,"app5:green":#00FF00]&lt;BR /&gt;
used this as well&lt;BR /&gt;
{"App1:Red":0x53a051,"App2:green":#0xFF0000,"App3:Green":0xFF0000,"app4:Red":0x53a051,"app5:green":0xFF0000]&lt;/P&gt;

&lt;P&gt;didn't worked &lt;/P&gt;

&lt;P&gt;but when i used the below option it worked partially&lt;BR /&gt;
 &lt;STRONG&gt;{"Red":0x53a051,"Green":0xFF0000]&lt;BR /&gt;
  [0x53a051,0xFF0000]&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;however the problem was the pie color for app1 was red but pie color for app2 was red and app4 was green so its not assigning the colors to the pie based on the data &lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 10:56:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/issue-related-to-coloring-in-pie-based-on-application-status-in/m-p/460125#M30187</guid>
      <dc:creator>venky1544</dc:creator>
      <dc:date>2019-08-27T10:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: issue related to coloring in pie based on  application status in piechart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/issue-related-to-coloring-in-pie-based-on-application-status-in/m-p/460126#M30188</link>
      <description>&lt;P&gt;Hi Diogofgm &lt;/P&gt;

&lt;P&gt;thanks for the suggestion i understand it might be messy but i want to stick to the piechart or donut in this case i have used the drill down mechanism earlier but this is just a example i'm trying to achieve and trying to understand how does the piechart is picking the colors it should be pretty simple based on the data not sure where exactly it is going wrong or is it the limitation of the piechart &lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 11:06:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/issue-related-to-coloring-in-pie-based-on-application-status-in/m-p/460126#M30188</guid>
      <dc:creator>venky1544</dc:creator>
      <dc:date>2019-08-27T11:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: issue related to coloring in pie based on  application status in piechart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/issue-related-to-coloring-in-pie-based-on-application-status-in/m-p/460127#M30189</link>
      <description>&lt;P&gt;Hi Venky,&lt;/P&gt;

&lt;P&gt;I have no issue with the following query, can you try it please:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;chart&amp;gt;
            &amp;lt;search&amp;gt;
              &amp;lt;query&amp;gt; your search | stats count by application &amp;lt;/query&amp;gt;
                  ...
                &amp;lt;/search&amp;gt;
                ...
               &amp;lt;option name="charting.legend.labels"&amp;gt;[Green,Red]&amp;lt;/option&amp;gt;
                &amp;lt;option name="charting.seriesColors"&amp;gt;[0x53a051,0xFF0000]&amp;lt;/option&amp;gt;
 &amp;lt;/chart&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tested it with:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;chart&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;| makeresults 
| eval app="app1:Red,app2:Green,app3:Green,app4:Red,app5:Green"
| makemv app delim="," 
| rex field=app "(?&amp;lt;application&amp;gt;[^:]+)"
| rex field=app ":(?&amp;lt;status&amp;gt;.+)"
| stats count by application&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="charting.chart"&amp;gt;pie&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.legend.labels"&amp;gt;[Green,Red]&amp;lt;/option&amp;gt;
            &amp;lt;option name="charting.seriesColors"&amp;gt;[0x53a051,0xFF0000]&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
      &amp;lt;/chart&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And I obtained the pie chart as needed&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/7565i8E46C227B210C019/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Hope it helps&lt;/P&gt;

&lt;P&gt;Best regards,&lt;BR /&gt;
Adrian&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2019 12:50:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/issue-related-to-coloring-in-pie-based-on-application-status-in/m-p/460127#M30189</guid>
      <dc:creator>Adrian_ftx</dc:creator>
      <dc:date>2019-08-28T12:50:02Z</dc:date>
    </item>
    <item>
      <title>Re: issue related to coloring in pie based on  application status in piechart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/issue-related-to-coloring-in-pie-based-on-application-status-in/m-p/460128#M30190</link>
      <description>&lt;P&gt;Hi Adrian&lt;/P&gt;

&lt;P&gt;your dataset had app1 as red and app2 as green&lt;/P&gt;

&lt;P&gt;and your piechart is showing different colors &lt;/P&gt;

&lt;P&gt;somehow its following a pattern of green red green red irrespective of the status &lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2019 14:50:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/issue-related-to-coloring-in-pie-based-on-application-status-in/m-p/460128#M30190</guid>
      <dc:creator>venky1544</dc:creator>
      <dc:date>2019-08-28T14:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: issue related to coloring in pie based on  application status in piechart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/issue-related-to-coloring-in-pie-based-on-application-status-in/m-p/460129#M30191</link>
      <description>&lt;P&gt;indeed, I was wrong.&lt;BR /&gt;
I'll work on it to try to find a solution.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2019 14:57:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/issue-related-to-coloring-in-pie-based-on-application-status-in/m-p/460129#M30191</guid>
      <dc:creator>Adrian_ftx</dc:creator>
      <dc:date>2019-08-28T14:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: issue related to coloring in pie based on  application status in piechart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/issue-related-to-coloring-in-pie-based-on-application-status-in/m-p/460130#M30192</link>
      <description>&lt;P&gt;a regular piechart is a 1 series chart. which means each value from the series is represented as a slice thus a different color. You can set a color for each value or let splunk assign it from a pool of colours.&lt;BR /&gt;
your chart has 2 series application_name and status. so it won't work.  &lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2019 00:29:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/issue-related-to-coloring-in-pie-based-on-application-status-in/m-p/460130#M30192</guid>
      <dc:creator>diogofgm</dc:creator>
      <dc:date>2019-08-29T00:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: issue related to coloring in pie based on  application status in piechart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/issue-related-to-coloring-in-pie-based-on-application-status-in/m-p/460131#M30193</link>
      <description>&lt;P&gt;There used to be an app that you could implement custom vids where it was possible to implement a multi level piechart (more than 1 series) called Sunburst and  found here &lt;A href="https://splunkbase.splunk.com/app/2717/"&gt;https://splunkbase.splunk.com/app/2717/&lt;/A&gt; &lt;BR /&gt;
But it has not been updated to Splunk v7 since in v6.4 Splunk made possible to integrate custom viz natively. But give it a try a see if it helps you.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2019 00:38:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/issue-related-to-coloring-in-pie-based-on-application-status-in/m-p/460131#M30193</guid>
      <dc:creator>diogofgm</dc:creator>
      <dc:date>2019-08-29T00:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: issue related to coloring in pie based on  application status in piechart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/issue-related-to-coloring-in-pie-based-on-application-status-in/m-p/460132#M30194</link>
      <description>&lt;P&gt;@venky1544 I dont think Pie Chart is the right visualization for your use case. Pie chart shows slices based on percentage of data. In your case Slices and Colors of slices will have no significance.&lt;/P&gt;

&lt;P&gt;You should be looking for &lt;/P&gt;

&lt;P&gt;1) either built in Single Value Visualization with Trellis Layout (Splunk 6.6 or higher) and color based on Status. Following are some of the answers for reference:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/590581/refresh-data-in-table-by-collecting-token-on-click.html"&gt;https://answers.splunk.com/answers/590581/refresh-data-in-table-by-collecting-token-on-click.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/470029/how-to-edit-my-search-in-order-to-assign-colors-to.html"&gt;https://answers.splunk.com/answers/470029/how-to-edit-my-search-in-order-to-assign-colors-to.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;or&lt;BR /&gt;
2) Status Indicator Custom Visualization with Trellis Layout with color and icon based on Status. Refer to following answers with slightly different use cases: &lt;A href="https://answers.splunk.com/answers/613370/status-indicator-app-how-do-i-access-search-result.html"&gt;https://answers.splunk.com/answers/613370/status-indicator-app-how-do-i-access-search-result.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/671398/how-to-make-trellis-smaller-in-the-dashboard-using.html"&gt;https://answers.splunk.com/answers/671398/how-to-make-trellis-smaller-in-the-dashboard-using.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/606353/dashboard-help-1.html"&gt;https://answers.splunk.com/answers/606353/dashboard-help-1.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;PS: If you really need Pie Chart you would need to have Status in the Legend of each Pie label and possibly color the Legend based on Up or Down with Slices showing data could be plotted. But that has to be done through Simple XML JS extension as Legend text would need to be parsed and Style would need to be overridden accordingly. Following is an answer based on CSS using series color but only for idea on how color can be applied: &lt;A href="https://answers.splunk.com/answers/615999/pie-chart-vs-label-colors.html"&gt;https://answers.splunk.com/answers/615999/pie-chart-vs-label-colors.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2019 03:47:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/issue-related-to-coloring-in-pie-based-on-application-status-in/m-p/460132#M30194</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-08-29T03:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: issue related to coloring in pie based on  application status in piechart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/issue-related-to-coloring-in-pie-based-on-application-status-in/m-p/460133#M30195</link>
      <description>&lt;P&gt;Hi Adrian&lt;/P&gt;

&lt;P&gt;when i include the below statement it takes the option in green red green red format&lt;/P&gt;

&lt;P&gt;[0x53a051,0xFF0000]&lt;/P&gt;

&lt;P&gt;and when i exclude this  this it picks up random colors&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2019 08:44:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/issue-related-to-coloring-in-pie-based-on-application-status-in/m-p/460133#M30195</guid>
      <dc:creator>venky1544</dc:creator>
      <dc:date>2019-08-29T08:44:41Z</dc:date>
    </item>
  </channel>
</rss>

