<?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 - formatting in proc template in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/PIECHART-formatting-in-proc-template/m-p/663963#M20110</link>
    <description>&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I would like to modify the template of my pie chart by&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Changing the weight of the labels to bold, limited to the category (not frequency, not percentage)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Centering the labels in the column (actually right- or left-sided to appear closer to the chart)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Changing the format of the percentage to 1 digit after the comma (actually 2 digits)&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;This is my example dataset&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data mydata;
input group $1-4 value 6-7 ;
datalines;
cat1 10
cat2 15
cat3 4
;
run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;this is the template&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
	define statgraph pie;
		begingraph;
		layout region;
		piechart category=group response=value /  
			DATALABELcontent=(category response percent) datalabellocation=outside;
		endlayout;
		endgraph;
	end;&lt;BR /&gt;&lt;BR /&gt;proc&amp;nbsp;sgrender&amp;nbsp;data=mydata&amp;nbsp;template=pie;&lt;BR /&gt;run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is my final result&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Picture1.png" style="width: 443px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/46443i484436435F27DD6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Picture1.png" alt="Picture1.png" /&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;Thanks in advance for Your precious support&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sincerely&lt;/P&gt;&lt;P&gt;antor82&lt;/P&gt;</description>
    <pubDate>Mon, 22 Jun 2020 12:16:14 GMT</pubDate>
    <dc:creator>antor82</dc:creator>
    <dc:date>2020-06-22T12:16:14Z</dc:date>
    <item>
      <title>PIECHART - formatting in proc template</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/PIECHART-formatting-in-proc-template/m-p/663963#M20110</link>
      <description>&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I would like to modify the template of my pie chart by&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Changing the weight of the labels to bold, limited to the category (not frequency, not percentage)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Centering the labels in the column (actually right- or left-sided to appear closer to the chart)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Changing the format of the percentage to 1 digit after the comma (actually 2 digits)&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;This is my example dataset&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data mydata;
input group $1-4 value 6-7 ;
datalines;
cat1 10
cat2 15
cat3 4
;
run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;this is the template&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
	define statgraph pie;
		begingraph;
		layout region;
		piechart category=group response=value /  
			DATALABELcontent=(category response percent) datalabellocation=outside;
		endlayout;
		endgraph;
	end;&lt;BR /&gt;&lt;BR /&gt;proc&amp;nbsp;sgrender&amp;nbsp;data=mydata&amp;nbsp;template=pie;&lt;BR /&gt;run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is my final result&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Picture1.png" style="width: 443px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/46443i484436435F27DD6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Picture1.png" alt="Picture1.png" /&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;Thanks in advance for Your precious support&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sincerely&lt;/P&gt;&lt;P&gt;antor82&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 12:16:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/PIECHART-formatting-in-proc-template/m-p/663963#M20110</guid>
      <dc:creator>antor82</dc:creator>
      <dc:date>2020-06-22T12:16:14Z</dc:date>
    </item>
  </channel>
</rss>

