<?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 Pie chart not displaying all variables in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Pie-chart-not-displaying-all-variables/m-p/521228#M17566</link>
    <description>&lt;P&gt;I am trying to make a simple pie chart using the Proc Gchart. However, the data set has two variables and second variable has the value zero. The dataset looks like the below code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data test;&lt;BR /&gt;input province $ amount;&lt;BR /&gt;datalines;&lt;BR /&gt;AA 20&lt;BR /&gt;BB 0&lt;BR /&gt;;&lt;BR /&gt;run&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The proc gchart code that i am using is :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC GCHART DATA =work.test;&lt;BR /&gt;PIE province / sumvar=amount other=1 legend=outside&lt;BR /&gt;midpoints=old&lt;BR /&gt;TYPE=SUM&lt;BR /&gt;value=none&lt;BR /&gt;PERCENT=arrow&lt;BR /&gt;slice=arrow&lt;BR /&gt;noheading&lt;BR /&gt;plabel=(font='albany AMT/bold' h=1.3 color=crimson);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;Below is the result of the proc gchart&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Pie chart.JPG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25684i15E7DD5219EF12F7/image-size/large?v=v2&amp;amp;px=999" role="button" title="Pie chart.JPG" alt="Pie chart.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result that i want is that&amp;nbsp;all variables (even with zero value) should be part of pie chart and legend.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 13 Dec 2018 18:12:01 GMT</pubDate>
    <dc:creator>suraj747</dc:creator>
    <dc:date>2018-12-13T18:12:01Z</dc:date>
    <item>
      <title>Pie chart not displaying all variables</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Pie-chart-not-displaying-all-variables/m-p/521228#M17566</link>
      <description>&lt;P&gt;I am trying to make a simple pie chart using the Proc Gchart. However, the data set has two variables and second variable has the value zero. The dataset looks like the below code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data test;&lt;BR /&gt;input province $ amount;&lt;BR /&gt;datalines;&lt;BR /&gt;AA 20&lt;BR /&gt;BB 0&lt;BR /&gt;;&lt;BR /&gt;run&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The proc gchart code that i am using is :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC GCHART DATA =work.test;&lt;BR /&gt;PIE province / sumvar=amount other=1 legend=outside&lt;BR /&gt;midpoints=old&lt;BR /&gt;TYPE=SUM&lt;BR /&gt;value=none&lt;BR /&gt;PERCENT=arrow&lt;BR /&gt;slice=arrow&lt;BR /&gt;noheading&lt;BR /&gt;plabel=(font='albany AMT/bold' h=1.3 color=crimson);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;Below is the result of the proc gchart&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Pie chart.JPG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25684i15E7DD5219EF12F7/image-size/large?v=v2&amp;amp;px=999" role="button" title="Pie chart.JPG" alt="Pie chart.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result that i want is that&amp;nbsp;all variables (even with zero value) should be part of pie chart and legend.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 13 Dec 2018 18:12:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Pie-chart-not-displaying-all-variables/m-p/521228#M17566</guid>
      <dc:creator>suraj747</dc:creator>
      <dc:date>2018-12-13T18:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: Pie chart not displaying all variables</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Pie-chart-not-displaying-all-variables/m-p/521686#M17570</link>
      <description>&lt;P&gt;Any pie chart with a zero area is going to have a lot of difficulty displaying it as part of chart.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Likely if you want something such as BB 0% displayed as part of the graph you may need to use some from of annotate. Which may be a lot of work if you actually have multiple 0 or just very small values.&lt;/P&gt;
&lt;P&gt;This is one of the reasons why many people prefer to use bar charts instead of pie charts; a 0 length bar is easy to include and label.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might also want to consider moving the more modern SGPLOT or SGPANEL procedures as those are the ones receiving additional features in recent releases.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Dec 2018 00:27:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Pie-chart-not-displaying-all-variables/m-p/521686#M17570</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-12-15T00:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: Pie chart not displaying all variables</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Pie-chart-not-displaying-all-variables/m-p/521689#M17572</link>
      <description>&lt;P&gt;Thanks for replying&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;.&lt;/P&gt;&lt;P&gt;Any resources or a reference code for SGPLOT or SGPANEL that might help with getting the desired output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 15 Dec 2018 00:52:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Pie-chart-not-displaying-all-variables/m-p/521689#M17572</guid>
      <dc:creator>suraj747</dc:creator>
      <dc:date>2018-12-15T00:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: Pie chart not displaying all variables</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Pie-chart-not-displaying-all-variables/m-p/521971#M17575</link>
      <description>&lt;P&gt;&lt;A href="http://support.sas.com/sassamples/graphgallery/PROC_SGPLOT.html" target="_blank"&gt;http://support.sas.com/sassamples/graphgallery/PROC_SGPLOT.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;has a number of examples for SGPLOT&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From what I can guess about your actual data this may be a close-ish example&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/48/123.html" target="_blank"&gt;http://support.sas.com/kb/48/123.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The example provides data, code and a view of the graph created&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/en/knowledge-base/graph-samples-gallery.html&amp;nbsp;&amp;nbsp;" target="_blank"&gt;https://support.sas.com/en/knowledge-base/graph-samples-gallery.html&amp;nbsp;&amp;nbsp;&lt;/A&gt; many examples of different procedures&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/A&gt; has many interesting examples of graphs using a variety of techniques&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;as does&lt;/P&gt;
&lt;P&gt;&lt;A href="http://robslink.com/SAS/" target="_blank"&gt;http://robslink.com/SAS/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Dec 2018 16:44:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Pie-chart-not-displaying-all-variables/m-p/521971#M17575</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-12-17T16:44:32Z</dc:date>
    </item>
    <item>
      <title>Re: Pie chart not displaying all variables</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Pie-chart-not-displaying-all-variables/m-p/522059#M17576</link>
      <description>Thanks for providing the links &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;. These are quite extensive. For my problem, I guess I will have to opt for some shabby way to display the missing content. Is there is any way we can highlight the concern to the folks at SAS so that that can possibly include some kind of fix for future release ?</description>
      <pubDate>Mon, 17 Dec 2018 23:05:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Pie-chart-not-displaying-all-variables/m-p/522059#M17576</guid>
      <dc:creator>suraj747</dc:creator>
      <dc:date>2018-12-17T23:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: Pie chart not displaying all variables</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Pie-chart-not-displaying-all-variables/m-p/522077#M17577</link>
      <description>&lt;P&gt;You can always post suggestions at &lt;A href="https://communities.sas.com/t5/SASware-Ballot-Ideas/idb-p/sas_ideas" target="_blank"&gt;https://communities.sas.com/t5/SASware-Ballot-Ideas/idb-p/sas_ideas&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;IMHO if the data is missing then anything that makes it appear as though values are actually there is a major error.&lt;/P&gt;
&lt;P&gt;For something like a BAR chart you can show a value of 0 or even missing with some knowledge of the options and settings. Pie charts, especially with your implication that you want to show multiple missing categories are going to start looking like there are values there as a sector of any width. Even showing a label of 0 may be interpreted as a value that has been rounded down to some extent. So I would question the use logic of showing categories that are not present with a pie chart other than as something like text saying explicitly that the categories are not represented.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Dec 2018 00:13:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Pie-chart-not-displaying-all-variables/m-p/522077#M17577</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-12-18T00:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: Pie chart not displaying all variables</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Pie-chart-not-displaying-all-variables/m-p/525695#M17633</link>
      <description>&lt;P&gt;The "other=1" option would group any slice less than 1% into an 'other' slice, and I presume since value of zero is less than 1% of the pie, it is going into 'other' ... and then since the 'other' slice is 0% of the pie, gchart is not showing it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To have this pie slice show up, you could set it to a very small non-zero value (such as .00001) and then use other=0 (so the slice doesn't get lumped into an 'other' slice). I'm not sure it's a good idea to have such a pie ... but this is one way to visually produce what you're asking for &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data test;&lt;BR /&gt;input province $ amount;&lt;BR /&gt;datalines;&lt;BR /&gt;AA 20&lt;BR /&gt;BB 0.00001&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;PROC GCHART DATA=test;&lt;BR /&gt;PIE province / sumvar=amount &lt;BR /&gt;angle=90&lt;BR /&gt;other=0 &lt;BR /&gt;legend=outside&lt;BR /&gt;midpoints=old&lt;BR /&gt;TYPE=SUM&lt;BR /&gt;value=none&lt;BR /&gt;PERCENT=arrow&lt;BR /&gt;slice=arrow&lt;BR /&gt;noheading&lt;BR /&gt;plabel=(font='albany AMT/bold' h=1.3 color=crimson);&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zero_pie.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/26129i037D3702CF57E0E2/image-size/large?v=v2&amp;amp;px=999" role="button" title="zero_pie.png" alt="zero_pie.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 12:52:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Pie-chart-not-displaying-all-variables/m-p/525695#M17633</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2019-01-09T12:52:43Z</dc:date>
    </item>
  </channel>
</rss>

