<?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: Formatting Data Label in PIECHART in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Formatting-Data-Label-in-PIECHART/m-p/660064#M197618</link>
    <description>&lt;P&gt;I tried using `format` after my SGRender call, but didn't get the desired results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgrender data=viz_body_pct(where=(event_type=1))
	template = top5pie;
    format pct mypcta.;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In the documentation it says that the STAT= option when using a response variable (which is `pct`) is SUM. Is there a way to format the SUM?&lt;/P&gt;</description>
    <pubDate>Tue, 16 Jun 2020 15:14:24 GMT</pubDate>
    <dc:creator>tburus</dc:creator>
    <dc:date>2020-06-16T15:14:24Z</dc:date>
    <item>
      <title>Formatting Data Label in PIECHART</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Formatting-Data-Label-in-PIECHART/m-p/660044#M197612</link>
      <description>&lt;P&gt;I have created a template for a pie chart and would like to control the format of the data label. Currently, the data label is reporting the percent to two decimal places, but I'd like to change this to one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
define statgraph top5pie;
begingraph / datacolors=(&amp;amp;Dblue &amp;amp;Dgray &amp;amp;Dblack &amp;amp;Dblue2 &amp;amp;Dgray2);
layout region;
	piechart category = interest response = pct /
	datalabellocation = inside
	datalabelcontent=(percent)
	datalabelattrs = (family='Arial/bold' weight=bold size=10pt color=&amp;amp;Dgold.)
	categorydirection = clockwise
	dataskin = crisp
	start = 180 name = 'pie'
	otherslice=true
  	othersliceopts=(type=percent percent=10 label="Others (&amp;lt;10% Each)" fillattrs=(color=&amp;amp;Dtan));
	discretelegend 'pie' /
	title = ''
	titleattrs = (family='Arial' size=12pt)
	itemsize=(fillheight=big)
	border = false;
endlayout;
endgraph;
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Jun 2020 14:07:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Formatting-Data-Label-in-PIECHART/m-p/660044#M197612</guid>
      <dc:creator>tburus</dc:creator>
      <dc:date>2020-06-16T14:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting Data Label in PIECHART</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Formatting-Data-Label-in-PIECHART/m-p/660060#M197617</link>
      <description>&lt;P&gt;Quite often assigning a format in the SGRENDER for the variable involved can address such issues.&lt;/P&gt;
&lt;P&gt;Pseudocode since you didn't provide an example your call:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Proc sgrender data=have template=yourtemplate;
   format Plotvar formatname.;
run;&lt;/PRE&gt;
&lt;P&gt;Where formatname is an appropriate format for the value, maybe percent8.1 or f5.1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And worst it takes a minute or two to test this approach. At best it does what you want.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2020 15:02:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Formatting-Data-Label-in-PIECHART/m-p/660060#M197617</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-06-16T15:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting Data Label in PIECHART</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Formatting-Data-Label-in-PIECHART/m-p/660064#M197618</link>
      <description>&lt;P&gt;I tried using `format` after my SGRender call, but didn't get the desired results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgrender data=viz_body_pct(where=(event_type=1))
	template = top5pie;
    format pct mypcta.;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In the documentation it says that the STAT= option when using a response variable (which is `pct`) is SUM. Is there a way to format the SUM?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2020 15:14:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Formatting-Data-Label-in-PIECHART/m-p/660064#M197618</guid>
      <dc:creator>tburus</dc:creator>
      <dc:date>2020-06-16T15:14:24Z</dc:date>
    </item>
  </channel>
</rss>

