<?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 Moving Datalabels to Legend and Reducing size of pie chart in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Moving-Datalabels-to-Legend-and-Reducing-size-of-pie-chart/m-p/835599#M23178</link>
    <description>&lt;P&gt;I made a pie chart and I want to&amp;nbsp;move/insert the data label into the legend. I have attached an example below.&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="legend_graph.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75681iCA3378B9E38ABB97/image-size/medium?v=v2&amp;amp;px=400" role="button" title="legend_graph.jpg" alt="legend_graph.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I also want to reduce the size of the pie chart but keep everything else (footnotes, legend) the same size.&lt;/P&gt;&lt;P&gt;I have also attached my code below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data_&amp;amp;cat looks like this&lt;/P&gt;&lt;P&gt;types frequency percentage&lt;/P&gt;&lt;P&gt;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 80%&lt;/P&gt;&lt;P&gt;B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 20%&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;amp;cat=types&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc template;
	define statgraph types;
	begingraph;
	entryfootnote "Other: &amp;amp;other";
	layout region;
	piechart category=&amp;amp;cat response=percentage/ 
		datalabellocation=inside
		datalabelcontent=(response)
		datalabelattrs = (size=8pt)
		otherslice=false
		categorydirection=clockwise
		start = 180
		name = 'types';
	discretelegend 'types' / border=false 
		title= "&amp;amp;cat: " location=inside
		across=1 valign=top halign=left;
	endlayout;
	endgraph;
	end;
run;

proc sgrender data=data_&amp;amp;cat template=types;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 28 Sep 2022 17:49:15 GMT</pubDate>
    <dc:creator>sasuser63</dc:creator>
    <dc:date>2022-09-28T17:49:15Z</dc:date>
    <item>
      <title>Moving Datalabels to Legend and Reducing size of pie chart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Moving-Datalabels-to-Legend-and-Reducing-size-of-pie-chart/m-p/835599#M23178</link>
      <description>&lt;P&gt;I made a pie chart and I want to&amp;nbsp;move/insert the data label into the legend. I have attached an example below.&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="legend_graph.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75681iCA3378B9E38ABB97/image-size/medium?v=v2&amp;amp;px=400" role="button" title="legend_graph.jpg" alt="legend_graph.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I also want to reduce the size of the pie chart but keep everything else (footnotes, legend) the same size.&lt;/P&gt;&lt;P&gt;I have also attached my code below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data_&amp;amp;cat looks like this&lt;/P&gt;&lt;P&gt;types frequency percentage&lt;/P&gt;&lt;P&gt;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 80%&lt;/P&gt;&lt;P&gt;B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 20%&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;amp;cat=types&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc template;
	define statgraph types;
	begingraph;
	entryfootnote "Other: &amp;amp;other";
	layout region;
	piechart category=&amp;amp;cat response=percentage/ 
		datalabellocation=inside
		datalabelcontent=(response)
		datalabelattrs = (size=8pt)
		otherslice=false
		categorydirection=clockwise
		start = 180
		name = 'types';
	discretelegend 'types' / border=false 
		title= "&amp;amp;cat: " location=inside
		across=1 valign=top halign=left;
	endlayout;
	endgraph;
	end;
run;

proc sgrender data=data_&amp;amp;cat template=types;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Sep 2022 17:49:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Moving-Datalabels-to-Legend-and-Reducing-size-of-pie-chart/m-p/835599#M23178</guid>
      <dc:creator>sasuser63</dc:creator>
      <dc:date>2022-09-28T17:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Datalabels to Legend and Reducing size of pie chart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Moving-Datalabels-to-Legend-and-Reducing-size-of-pie-chart/m-p/835629#M23179</link>
      <description>&lt;P&gt;Please post code in a code box opened with the &amp;lt;/&amp;gt; icon&amp;nbsp; that appears above the message window. That way it is much easier to discuss the text and show changes. Copy and paste text from the editor should be at least as quick as attaching a text file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc template;
	define statgraph types;
	begingraph;
	entryfootnote "Other: &amp;amp;other";
	layout region;
	piechart category=&amp;amp;cat response=percentage/ 
		datalabellocation=inside
		datalabelcontent=(response)
		datalabelattrs = (size=8pt)
		otherslice=false
		categorydirection=clockwise
		start = 180
		name = 'types';
	discretelegend 'types' / border=false 
		title= "&amp;amp;cat: " location=inside
		across=1 valign=top halign=left;
	endlayout;
	endgraph;
	end;
run;

proc sgrender data=data_&amp;amp;cat template=types;
run;&lt;/PRE&gt;
&lt;P&gt;Since you are using Macro Variables in the code it really helps to provide examples of those as well especially as we need the actual name of the CATEGORY=&amp;amp;CAT in the data set to match.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2022 15:00:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Moving-Datalabels-to-Legend-and-Reducing-size-of-pie-chart/m-p/835629#M23179</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-09-28T15:00:45Z</dc:date>
    </item>
  </channel>
</rss>

