<?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 piechart: overlapping values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/piechart-overlapping-values/m-p/473268#M285871</link>
    <description>&lt;P&gt;Dear Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i just created a pie chart and have a lot of overlapping values. Do you know how to deal with it?&lt;/P&gt;&lt;P&gt;I also would like to have the whole Name of the categories, but its only the first 7 letters. What can i do about it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance &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;PRE&gt;&lt;CODE class=" language-sas"&gt;data arzneimittelgruppen;
set arzneimittelgruppen;
if allergy=1 then category="allergy";
if antibiotics=1 then category="antibiotics";
if antidiabetic=1 then category="antidiabetic";
if antihypertensive=1 then category="antihypertensive";
if antipsychotic=1 then category="antipsychotic";
if antivirals=1 then category="antivirals";
if biologicals=1 then category="biologicals";
if contrast=1 then category="contrast";
if copd=1 then category="copd";
if dermatology=1 then category="dermatology";
if registry=1 then category="registry";
if eye=1 then category="eye";
if haematology=1 then category="haematology";
if hormone=1 then category="hormone";
if neurological=1 then category="neurological";
if nondrug=1 then category="nondrug";
if nonpres=1 then category="nonpres";
if oncology=1 then category="oncology";
if orphan=1 then category="orphan";
if others=1 then category="others";
if pain=1 then category="pain";
if urologics=1 then category="urologics";
run;

data arzneimittelgruppen;
set arzneimittelgruppen;
format category $20.;
run;

data arzneimittelgruppen;
  length category $ 20;
  set arzneimittelgruppen;
run;


PROC GCHART 
DATA=arzneimittelgruppen;
PIE3d category / other=0 clockwise type= percent;
RUN;
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="piechart.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21388iE69701EE8CE78A2A/image-size/large?v=v2&amp;amp;px=999" role="button" title="piechart.png" alt="piechart.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 26 Jun 2018 08:53:53 GMT</pubDate>
    <dc:creator>marysmith</dc:creator>
    <dc:date>2018-06-26T08:53:53Z</dc:date>
    <item>
      <title>piechart: overlapping values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/piechart-overlapping-values/m-p/473268#M285871</link>
      <description>&lt;P&gt;Dear Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i just created a pie chart and have a lot of overlapping values. Do you know how to deal with it?&lt;/P&gt;&lt;P&gt;I also would like to have the whole Name of the categories, but its only the first 7 letters. What can i do about it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance &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;PRE&gt;&lt;CODE class=" language-sas"&gt;data arzneimittelgruppen;
set arzneimittelgruppen;
if allergy=1 then category="allergy";
if antibiotics=1 then category="antibiotics";
if antidiabetic=1 then category="antidiabetic";
if antihypertensive=1 then category="antihypertensive";
if antipsychotic=1 then category="antipsychotic";
if antivirals=1 then category="antivirals";
if biologicals=1 then category="biologicals";
if contrast=1 then category="contrast";
if copd=1 then category="copd";
if dermatology=1 then category="dermatology";
if registry=1 then category="registry";
if eye=1 then category="eye";
if haematology=1 then category="haematology";
if hormone=1 then category="hormone";
if neurological=1 then category="neurological";
if nondrug=1 then category="nondrug";
if nonpres=1 then category="nonpres";
if oncology=1 then category="oncology";
if orphan=1 then category="orphan";
if others=1 then category="others";
if pain=1 then category="pain";
if urologics=1 then category="urologics";
run;

data arzneimittelgruppen;
set arzneimittelgruppen;
format category $20.;
run;

data arzneimittelgruppen;
  length category $ 20;
  set arzneimittelgruppen;
run;


PROC GCHART 
DATA=arzneimittelgruppen;
PIE3d category / other=0 clockwise type= percent;
RUN;
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="piechart.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21388iE69701EE8CE78A2A/image-size/large?v=v2&amp;amp;px=999" role="button" title="piechart.png" alt="piechart.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jun 2018 08:53:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/piechart-overlapping-values/m-p/473268#M285871</guid>
      <dc:creator>marysmith</dc:creator>
      <dc:date>2018-06-26T08:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: piechart: overlapping values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/piechart-overlapping-values/m-p/473430#M285872</link>
      <description>&lt;P&gt;You can get the full value of your Category variable by adding a LENGTH statement prior to assigning a value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Length category $ 20;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="token keyword"&gt;if&lt;/SPAN&gt; allergy&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;1&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;then&lt;/SPAN&gt; category&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"allergy"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="token punctuation"&gt;If a length is not explicitly set then SAS default rules will assign a length. Since the first use you have is to assign "allergy" then the length gets set to 7 to hold that word. Everything longer then gets truncated.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="token punctuation"&gt;Pie charts in general are hard to interpret the visual portion of contribution to a whole. The tilted 3d version is even worse. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="token punctuation"&gt;If a Pie chart must be use then use PIE instead of pie3d and the option percent=arrow may help with displaying text of the smaller slices.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jun 2018 15:21:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/piechart-overlapping-values/m-p/473430#M285872</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-06-26T15:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: piechart: overlapping values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/piechart-overlapping-values/m-p/473438#M285873</link>
      <description>Thank you! Ah I found my mistake thanks! Yeah I had a piechart before and I did it with the arrow option, but still the values overlapped &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 26 Jun 2018 15:38:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/piechart-overlapping-values/m-p/473438#M285873</guid>
      <dc:creator>marysmith</dc:creator>
      <dc:date>2018-06-26T15:38:15Z</dc:date>
    </item>
  </channel>
</rss>

