<?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: Left-right ordering of sidebar and rowheaders in GTL datalattice in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Left-right-ordering-of-sidebar-and-rowheaders-in-GTL-datalattice/m-p/237295#M8610</link>
    <description>&lt;P&gt;Sometimes an inline annotation (DRAWTEXT) is what you need.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc template;&lt;BR /&gt;&amp;nbsp; define statgraph test;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; begingraph;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; layout datalattice rowvar=cat1 / pad=(left=5pct)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;row2axisopts=(label='Cat 2 Description')&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; headerlabeldisplay=value headerlabellocation=outside rowheaders=left;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;drawtext "Cat 1 Description" / x=0 y=55 anchor=top rotate=90 width=50&amp;nbsp;drawspace=layoutpercent;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;layout prototype;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;barchart x=cat2 y=pct_row /&amp;nbsp;orient=horizontal yaxis=y2;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; endlayout;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; endlayout;&lt;BR /&gt;&amp;nbsp; endgraph;&lt;BR /&gt;end;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data bar;&lt;BR /&gt; format pct_row percent.;&lt;BR /&gt; input cat1 $ cat2 $ pct_row;&lt;BR /&gt; datalines;&lt;BR /&gt;TypeA TypeA 0.55&lt;BR /&gt;TypeA TypeB 0.55&lt;BR /&gt;TypeB TypeA 0.55&lt;BR /&gt;TypeB TypeB 0.60&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;proc sgrender data=bar template=test;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/1001iF6853B9E4E1D7226/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="DataLattice.png" title="DataLattice.png" /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 02 Dec 2015 00:56:48 GMT</pubDate>
    <dc:creator>Jay54</dc:creator>
    <dc:date>2015-12-02T00:56:48Z</dc:date>
    <item>
      <title>Left-right ordering of sidebar and rowheaders in GTL datalattice</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Left-right-ordering-of-sidebar-and-rowheaders-in-GTL-datalattice/m-p/237282#M8609</link>
      <description>&lt;P&gt;I have a finicky problem with laying out labels in a GTL datalattice.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This almost does what I want, with one problem: the sidebar 'Cat 1 Description' (which describes the rowheaders) should be to the left of the rowheaders 'Type A' and 'Type B', and I can't figure out how to get it there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
define statgraph test;
	begingraph;
		layout datalattice rowvar=cat1 /
			row2axisopts=(label='Cat 2 Description')
			headerlabeldisplay=value headerlabellocation=outside rowheaders=left;
			sidebar / align=left;
				entry 'Cat 1 Description' / rotate=90;
			endsidebar;
			layout prototype;
				barchart x=cat2 y=pct_row /
					orient=horizontal yaxis=y2;
			endlayout;
		endlayout;
	endgraph;
end;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/1000iD402C7D22768D4B7/image-size/original?v=mpbl-1&amp;amp;px=-1" alt="graph.png" title="graph.png" border="0" /&gt;&lt;/P&gt;&lt;P&gt;This is the vertical bar equivalent, which is laid out just how I like it:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
define statgraph test;
	begingraph;
		layout datalattice columnvar=cat1 /
			columnaxisopts=(label='Cat 2 Description')
			headerlabeldisplay=value headerlabellocation=inside columnheaders=top;
			    sidebar / align=top;
					entry 'Cat 1 Description';
				endsidebar;
				layout prototype;
					barchart x=cat2 y=pct_row /
						orient=vertical;
				endlayout;
		endlayout;
	endgraph;
end;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Things I've tried that didn't work: headerlabellocation=inside (changes the row headers to be horizontal text at the top of the cell, at least in SAS 9.3); adding a cell with the row label text within a gridded layout (too much whitespace).&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2015 00:06:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Left-right-ordering-of-sidebar-and-rowheaders-in-GTL-datalattice/m-p/237282#M8609</guid>
      <dc:creator>mbg</dc:creator>
      <dc:date>2015-12-02T00:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: Left-right ordering of sidebar and rowheaders in GTL datalattice</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Left-right-ordering-of-sidebar-and-rowheaders-in-GTL-datalattice/m-p/237295#M8610</link>
      <description>&lt;P&gt;Sometimes an inline annotation (DRAWTEXT) is what you need.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc template;&lt;BR /&gt;&amp;nbsp; define statgraph test;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; begingraph;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; layout datalattice rowvar=cat1 / pad=(left=5pct)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;row2axisopts=(label='Cat 2 Description')&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; headerlabeldisplay=value headerlabellocation=outside rowheaders=left;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;drawtext "Cat 1 Description" / x=0 y=55 anchor=top rotate=90 width=50&amp;nbsp;drawspace=layoutpercent;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;layout prototype;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;barchart x=cat2 y=pct_row /&amp;nbsp;orient=horizontal yaxis=y2;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; endlayout;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; endlayout;&lt;BR /&gt;&amp;nbsp; endgraph;&lt;BR /&gt;end;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data bar;&lt;BR /&gt; format pct_row percent.;&lt;BR /&gt; input cat1 $ cat2 $ pct_row;&lt;BR /&gt; datalines;&lt;BR /&gt;TypeA TypeA 0.55&lt;BR /&gt;TypeA TypeB 0.55&lt;BR /&gt;TypeB TypeA 0.55&lt;BR /&gt;TypeB TypeB 0.60&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;proc sgrender data=bar template=test;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/1001iF6853B9E4E1D7226/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="DataLattice.png" title="DataLattice.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2015 00:56:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Left-right-ordering-of-sidebar-and-rowheaders-in-GTL-datalattice/m-p/237295#M8610</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2015-12-02T00:56:48Z</dc:date>
    </item>
    <item>
      <title>Re: Left-right ordering of sidebar and rowheaders in GTL datalattice</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Left-right-ordering-of-sidebar-and-rowheaders-in-GTL-datalattice/m-p/237296#M8611</link>
      <description>&lt;P&gt;Thanks Sanjay, that does the trick.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DRAWTEXT was indeed the missing link. I was trying to do it using ENTRY and not getting anywhere.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2015 01:21:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Left-right-ordering-of-sidebar-and-rowheaders-in-GTL-datalattice/m-p/237296#M8611</guid>
      <dc:creator>mbg</dc:creator>
      <dc:date>2015-12-02T01:21:40Z</dc:date>
    </item>
  </channel>
</rss>

