<?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: Displaying string value in pie chart in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Displaying-string-value-in-pie-chart/m-p/453483#M29747</link>
    <description>&lt;P&gt;Similar question already answered in here: &lt;A href="https://answers.splunk.com/answers/71090/how-to-display-the-count-in-piechart-as-labels.html"&gt;https://answers.splunk.com/answers/71090/how-to-display-the-count-in-piechart-as-labels.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Basically, Simple two options&lt;BR /&gt;
1. show as percent&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;option name="charting.chart.showPercent"&amp;gt;true&amp;lt;/option&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;2.Trick to include the value as a string&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.. | stats count by severity | eval severity_slice = count + " " + severity | fields severity_slice, count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 13 May 2019 13:03:08 GMT</pubDate>
    <dc:creator>koshyk</dc:creator>
    <dc:date>2019-05-13T13:03:08Z</dc:date>
    <item>
      <title>Displaying string value in pie chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Displaying-string-value-in-pie-chart/m-p/453482#M29746</link>
      <description>&lt;P&gt;I use multiple saves searches from different chart to display overall application health status. The chart works fine for me accept it only shows colors. I am working to display the string value (green, yellow, red) on the pie chart but it doesnt work as expected.&lt;/P&gt;

&lt;P&gt;Splunk pie chart (somehow) never displays the color name on the chart. I was wondering if there is a way to display the value on the chart. I tried to use the single value chart but looks like it adds colors only for numerical values and not for string. &lt;/P&gt;

&lt;P&gt;Please help me understand if anyone of you have achieved this in Splunk. Here are some additional details.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;panel&amp;gt;
  &amp;lt;chart&amp;gt;
    &amp;lt;title&amp;gt;Agent Portal&amp;lt;/title&amp;gt;
    &amp;lt;search&amp;gt;
      &amp;lt;query&amp;gt;
        | savedsearch "A" 
        | append [ | savedsearch "B"] 
        | append [ | savedsearch "C"]
        | append [ | savedsearch "D"]
        | append [ | savedsearch "E"]
        | append [ | savedsearch "F"]
        | append [ | savedsearch "G"] 
        | eval overall_health = min(availability_severity, performance_severity, apdex_severity, report_GCPA_severity, report_NBP_severity, report_OReq_severity, report_PGA_severity) 
        | stats min(overall_health) as severity 
        | eval color=case(severity="1","red",severity="2","yellow",severity="3","green") 
        | chart count by color
      &amp;lt;/query&amp;gt;
      &amp;lt;earliest&amp;gt;-15m&amp;lt;/earliest&amp;gt;
      &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
      &amp;lt;refresh&amp;gt;60s&amp;lt;/refresh&amp;gt;
      &amp;lt;refreshType&amp;gt;delay&amp;lt;/refreshType&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.chart.showLabels"&amp;gt;0&amp;lt;/option&amp;gt;
    &amp;lt;option name="height"&amp;gt;100&amp;lt;/option&amp;gt;
    &amp;lt;option name="charting.fieldColors"&amp;gt;{"red":0xff0000,"yellow":0xffc300,"green":0x65a637}&amp;lt;/option&amp;gt;
    &amp;lt;drilldown&amp;gt;
      &amp;lt;link target="_blank"&amp;gt;/app/search/application_health__agent_portal&amp;lt;/link&amp;gt;
    &amp;lt;/drilldown&amp;gt;
  &amp;lt;/chart&amp;gt;
&amp;lt;/panel&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 May 2019 03:00:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Displaying-string-value-in-pie-chart/m-p/453482#M29746</guid>
      <dc:creator>gmishra</dc:creator>
      <dc:date>2019-05-13T03:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying string value in pie chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Displaying-string-value-in-pie-chart/m-p/453483#M29747</link>
      <description>&lt;P&gt;Similar question already answered in here: &lt;A href="https://answers.splunk.com/answers/71090/how-to-display-the-count-in-piechart-as-labels.html"&gt;https://answers.splunk.com/answers/71090/how-to-display-the-count-in-piechart-as-labels.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Basically, Simple two options&lt;BR /&gt;
1. show as percent&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;option name="charting.chart.showPercent"&amp;gt;true&amp;lt;/option&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;2.Trick to include the value as a string&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.. | stats count by severity | eval severity_slice = count + " " + severity | fields severity_slice, count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 May 2019 13:03:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Displaying-string-value-in-pie-chart/m-p/453483#M29747</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2019-05-13T13:03:08Z</dc:date>
    </item>
  </channel>
</rss>

