<?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 Using LAYOUT LATTICE to get Side-by-Side Piecharts by Group in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Using-LAYOUT-LATTICE-to-get-Side-by-Side-Piecharts-by-Group/m-p/658356#M20097</link>
    <description>&lt;P&gt;I want to produce side-by-side pie charts filtered by group. I prefer the options available with the STATGRAPH template and SGRender, but can't seem to get the code to work. I have two event types. Below is the code I've attempted. The template doesn't throw an error, but it also doesn't produce the desired results (it gives me two grouped pie charts with 0/1 true/false indicators as labels).&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_compare;
begingraph / datacolors=(&amp;amp;Dblue &amp;amp;Dgray &amp;amp;Dblack &amp;amp;Dblue2 &amp;amp;Dgray2);
layout gridded / columns=1 rows=2;
	layout lattice / columns=2 rows=1 columngutter=2;
		cell;
			cellheader;
				entry "Competition";
			endcellheader;
			piechart category = interest response = pct / group=eval(event_type=1)
			datalabellocation = inside
			datalabelcontent=(category percent)
			datalabelattrs = (family='Arial/bold' weight=bold size=8pt color=&amp;amp;Dgold.)
			categorydirection = clockwise
			dataskin = crisp
			start = 180 name = 'pie'
			otherslice=true
		  	othersliceopts=(type=percent percent=10 label="Other Categories (&amp;lt;10% of Total)" fillattrs=(color=&amp;amp;Dtan));
		endcell;
		cell;
			cellheader;
				entry "Practice";
			endcellheader;
			piechart category = interest response = pct / group=eval(event_type=2)
			datalabellocation = inside
			datalabelcontent=(category percent)
			datalabelattrs = (family='Arial/bold' weight=bold size=8pt color=&amp;amp;DGold.)
			categorydirection = clockwise
			dataskin = crisp
			start = 180 name = 'pie'
			otherslice=true
		  	othersliceopts=(type=percent percent=10 label="Other Categories (&amp;lt;10% of Total)" fillattrs=(color=&amp;amp;Dtan));
		endcell;
	endlayout;
endlayout;
endgraph;
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 14 Jun 2020 14:28:32 GMT</pubDate>
    <dc:creator>tburus</dc:creator>
    <dc:date>2020-06-14T14:28:32Z</dc:date>
    <item>
      <title>Using LAYOUT LATTICE to get Side-by-Side Piecharts by Group</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Using-LAYOUT-LATTICE-to-get-Side-by-Side-Piecharts-by-Group/m-p/658356#M20097</link>
      <description>&lt;P&gt;I want to produce side-by-side pie charts filtered by group. I prefer the options available with the STATGRAPH template and SGRender, but can't seem to get the code to work. I have two event types. Below is the code I've attempted. The template doesn't throw an error, but it also doesn't produce the desired results (it gives me two grouped pie charts with 0/1 true/false indicators as labels).&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_compare;
begingraph / datacolors=(&amp;amp;Dblue &amp;amp;Dgray &amp;amp;Dblack &amp;amp;Dblue2 &amp;amp;Dgray2);
layout gridded / columns=1 rows=2;
	layout lattice / columns=2 rows=1 columngutter=2;
		cell;
			cellheader;
				entry "Competition";
			endcellheader;
			piechart category = interest response = pct / group=eval(event_type=1)
			datalabellocation = inside
			datalabelcontent=(category percent)
			datalabelattrs = (family='Arial/bold' weight=bold size=8pt color=&amp;amp;Dgold.)
			categorydirection = clockwise
			dataskin = crisp
			start = 180 name = 'pie'
			otherslice=true
		  	othersliceopts=(type=percent percent=10 label="Other Categories (&amp;lt;10% of Total)" fillattrs=(color=&amp;amp;Dtan));
		endcell;
		cell;
			cellheader;
				entry "Practice";
			endcellheader;
			piechart category = interest response = pct / group=eval(event_type=2)
			datalabellocation = inside
			datalabelcontent=(category percent)
			datalabelattrs = (family='Arial/bold' weight=bold size=8pt color=&amp;amp;DGold.)
			categorydirection = clockwise
			dataskin = crisp
			start = 180 name = 'pie'
			otherslice=true
		  	othersliceopts=(type=percent percent=10 label="Other Categories (&amp;lt;10% of Total)" fillattrs=(color=&amp;amp;Dtan));
		endcell;
	endlayout;
endlayout;
endgraph;
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 14 Jun 2020 14:28:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Using-LAYOUT-LATTICE-to-get-Side-by-Side-Piecharts-by-Group/m-p/658356#M20097</guid>
      <dc:creator>tburus</dc:creator>
      <dc:date>2020-06-14T14:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: Using LAYOUT LATTICE to get Side-by-Side Piecharts by Group</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Using-LAYOUT-LATTICE-to-get-Side-by-Side-Piecharts-by-Group/m-p/663394#M20098</link>
      <description>&lt;P&gt;Moved to graphs forum.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2020 06:27:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Using-LAYOUT-LATTICE-to-get-Side-by-Side-Piecharts-by-Group/m-p/663394#M20098</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-06-19T06:27:46Z</dc:date>
    </item>
  </channel>
</rss>

