<?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 to prevent slice labels from overlapping pie chart (gchart) in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-to-prevent-slice-labels-from-overlapping-pie-chart-gchart/m-p/733238#M21343</link>
    <description>&lt;P&gt;You could try to rearrange the order of your slice in order to avoid the overlapping.&lt;/P&gt;
&lt;P&gt;With little amount of slices you can do this manually.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;legend1 label=none
        shape=bar(4,1.5)
        position=(top left)
        offset=(5,)
        across=4
        mode=share;

PROC SQL;
select "'"||strip(var1)||"'" into :vars separated by ' '
from test2
;
quit;
%put &amp;amp;=vars;

proc gchart data=test2 ;
pie var1 / sumvar=var2
other=0
midpoints= 'BBBBBBBBBBBBB'  'GGGGGGGGGGGG'  'IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII' 'CCCCCCCCCCC' 'DDDDDDDDDDDD'  'HHHHHHHHHHHHH' 'AAAAAAA' 'LLLLLLLLLLLLLLLLL' 'FFFFFFFFFFFFFFF' 'EEEEEEEEEEEEE' 
angle=90
value= inside
percent=arrow
slice=none
noheading
coutline=black
legend=legend1;
;
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="2021-04-13_10h58_07.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/57465i76F2A3E929A8496F/image-size/large?v=v2&amp;amp;px=999" role="button" title="2021-04-13_10h58_07.png" alt="2021-04-13_10h58_07.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 13 Apr 2021 08:59:35 GMT</pubDate>
    <dc:creator>Oligolas</dc:creator>
    <dc:date>2021-04-13T08:59:35Z</dc:date>
    <item>
      <title>How to prevent slice labels from overlapping pie chart (gchart)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-prevent-slice-labels-from-overlapping-pie-chart-gchart/m-p/732783#M21329</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;can anyone help me out with this issue. The labels of my created pie chart overlaps. Is there any way to avoid that in a gchart?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Apr 2021 18:02:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-prevent-slice-labels-from-overlapping-pie-chart-gchart/m-p/732783#M21329</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2021-04-10T18:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent slice labels from overlapping pie chart (gchart)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-prevent-slice-labels-from-overlapping-pie-chart-gchart/m-p/732786#M21330</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;you could try one of the&amp;nbsp;&lt;A href="https://v8doc.sas.com/sashtml/gref/zart-pie.htm" target="_self"&gt;slice-ordering options&lt;/A&gt;&lt;/P&gt;
&lt;TABLE cellspacing="2" cellpadding="6"&gt;
&lt;TBODY&gt;
&lt;TR valign="top"&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;ANGLE=&lt;I&gt;degrees&lt;/I&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR valign="top"&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;ASCENDING&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR valign="top"&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;CLOCKWISE&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR valign="top"&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;DESCENDING&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR valign="top"&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;JSTYLE&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Apr 2021 18:19:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-prevent-slice-labels-from-overlapping-pie-chart-gchart/m-p/732786#M21330</guid>
      <dc:creator>Oligolas</dc:creator>
      <dc:date>2021-04-10T18:19:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent slice labels from overlapping pie chart (gchart)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-prevent-slice-labels-from-overlapping-pie-chart-gchart/m-p/732787#M21331</link>
      <description>okay, thanks</description>
      <pubDate>Sat, 10 Apr 2021 18:21:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-prevent-slice-labels-from-overlapping-pie-chart-gchart/m-p/732787#M21331</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2021-04-10T18:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent slice labels from overlapping pie chart (gchart)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-prevent-slice-labels-from-overlapping-pie-chart-gchart/m-p/732848#M21332</link>
      <description>&lt;P&gt;How many slices do you have?&lt;/P&gt;
&lt;P&gt;Can&amp;nbsp; you share your code, and output?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Apr 2021 11:07:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-prevent-slice-labels-from-overlapping-pie-chart-gchart/m-p/732848#M21332</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2021-04-11T11:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent slice labels from overlapping pie chart (gchart)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-prevent-slice-labels-from-overlapping-pie-chart-gchart/m-p/732858#M21333</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13585"&gt;@GraphGuy&lt;/a&gt;&amp;nbsp;: here is the data and code&lt;/P&gt;
&lt;PRE&gt;legend1 label=none
        shape=bar(4,1.5)
        position=(top left)
        offset=(5,)
        across=4
        mode=share;


proc gchart data=test2 ;
    pie var1 / sumvar=var2
	            noheading
                coutline=black
				other=0
				value= inside
			    angle=-20
				descending
				percent= arrow
				jstyle
				legend=legend1;
			
run;
quit;
&lt;/PRE&gt;</description>
      <pubDate>Sun, 11 Apr 2021 15:00:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-prevent-slice-labels-from-overlapping-pie-chart-gchart/m-p/732858#M21333</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2021-04-11T15:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent slice labels from overlapping pie chart (gchart)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-prevent-slice-labels-from-overlapping-pie-chart-gchart/m-p/733000#M21334</link>
      <description>&lt;P&gt;Instead of &lt;STRONG&gt;other=0&lt;/STRONG&gt; (which shows all the slices, no matter how small they are), I recommend using other=1 so that any slice less than 1% is grouped into an 'other' slice.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is very difficult to place labels on a lot of very small slices, and also difficult for someone viewing a pie chart to gain much value from seeing a lot of very small slices.&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="otherpie.png" style="width: 800px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/57399i2A0882E71D801B12/image-size/large?v=v2&amp;amp;px=999" role="button" title="otherpie.png" alt="otherpie.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Apr 2021 12:27:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-prevent-slice-labels-from-overlapping-pie-chart-gchart/m-p/733000#M21334</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2021-04-12T12:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent slice labels from overlapping pie chart (gchart)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-prevent-slice-labels-from-overlapping-pie-chart-gchart/m-p/733063#M21336</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13585"&gt;@GraphGuy&lt;/a&gt;&amp;nbsp; thanks for that, is it also possible to create two pie charts. For example forcing certain slices( not only those with values =1) in "other slice" and displaying the values of "other slice" in a second pie chart&lt;/P&gt;</description>
      <pubDate>Mon, 12 Apr 2021 18:19:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-prevent-slice-labels-from-overlapping-pie-chart-gchart/m-p/733063#M21336</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2021-04-12T18:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent slice labels from overlapping pie chart (gchart)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-prevent-slice-labels-from-overlapping-pie-chart-gchart/m-p/733068#M21338</link>
      <description>&lt;P&gt;There's nothing automated to create a 2nd pie based on the values that would go in the 'other' slice. You would have to split your dataset, and run Proc Gchart or SGpie twice.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps a pie chart isn't best suited for the data you're wanting to visualize?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Apr 2021 18:48:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-prevent-slice-labels-from-overlapping-pie-chart-gchart/m-p/733068#M21338</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2021-04-12T18:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent slice labels from overlapping pie chart (gchart)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-prevent-slice-labels-from-overlapping-pie-chart-gchart/m-p/733238#M21343</link>
      <description>&lt;P&gt;You could try to rearrange the order of your slice in order to avoid the overlapping.&lt;/P&gt;
&lt;P&gt;With little amount of slices you can do this manually.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;legend1 label=none
        shape=bar(4,1.5)
        position=(top left)
        offset=(5,)
        across=4
        mode=share;

PROC SQL;
select "'"||strip(var1)||"'" into :vars separated by ' '
from test2
;
quit;
%put &amp;amp;=vars;

proc gchart data=test2 ;
pie var1 / sumvar=var2
other=0
midpoints= 'BBBBBBBBBBBBB'  'GGGGGGGGGGGG'  'IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII' 'CCCCCCCCCCC' 'DDDDDDDDDDDD'  'HHHHHHHHHHHHH' 'AAAAAAA' 'LLLLLLLLLLLLLLLLL' 'FFFFFFFFFFFFFFF' 'EEEEEEEEEEEEE' 
angle=90
value= inside
percent=arrow
slice=none
noheading
coutline=black
legend=legend1;
;
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="2021-04-13_10h58_07.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/57465i76F2A3E929A8496F/image-size/large?v=v2&amp;amp;px=999" role="button" title="2021-04-13_10h58_07.png" alt="2021-04-13_10h58_07.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 08:59:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-prevent-slice-labels-from-overlapping-pie-chart-gchart/m-p/733238#M21343</guid>
      <dc:creator>Oligolas</dc:creator>
      <dc:date>2021-04-13T08:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent slice labels from overlapping pie chart (gchart)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-prevent-slice-labels-from-overlapping-pie-chart-gchart/m-p/733253#M21344</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/77163"&gt;@Oligolas&lt;/a&gt;&amp;nbsp;thankyou very much. It worked&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 10:45:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-prevent-slice-labels-from-overlapping-pie-chart-gchart/m-p/733253#M21344</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2021-04-13T10:45:59Z</dc:date>
    </item>
  </channel>
</rss>

