<?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: Place bar graph data in group order in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Place-bar-graph-data-in-group-order/m-p/267073#M9574</link>
    <description>&lt;P&gt;I see a few issues with your code. &amp;nbsp;I had to change the attributes to read in the data correctly. &amp;nbsp;Your data has only 1 category value (X=SntmntType) and 4 groups. &amp;nbsp;Default GroupDisplay is STACK. &amp;nbsp;If you want these side by side, use GroupDisplay=CLUSTER. &amp;nbsp;To get them in the order you want, you have to order the values yourself in the data, using&amp;nbsp;grouporder=data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data Data_Tbl;&lt;BR /&gt;attrib &lt;BR /&gt;/*SntmntType informat=$15.*/&lt;BR /&gt;Source informat=$15.&lt;BR /&gt;;&lt;BR /&gt;/*infile datalines delimiter='09'x dsd firstobs=1; */&lt;BR /&gt;input SntmntType $ Source $ Column1;&lt;BR /&gt;datalines;&lt;BR /&gt;Ovrll StsfctnPrcnt_1 -0.384&lt;BR /&gt;Ovrll StsfctnPrcnt_2 -0.046&lt;BR /&gt;Ovrll StsfctnPrcnt_3 0.224&lt;BR /&gt;Ovrll StsfctnPrcnt_4 0.346&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;proc print;run;&lt;/P&gt;
&lt;P&gt;proc template;&lt;BR /&gt;define statgraph StkdClstrBr;&lt;BR /&gt;begingraph / datacolors=(verylightred verylightyellow verylightgreen lightblue);&lt;BR /&gt;entrytitle '';&lt;BR /&gt;layout overlay / xaxisopts=(Label=" ") yaxisopts=(Label=" ");&lt;BR /&gt;barchart x=SntmntType y=Column1 / orient=horizontal grouporder=data group=Source&lt;BR /&gt;name='a';&lt;BR /&gt;discretelegend 'a';&lt;BR /&gt;endlayout;&lt;BR /&gt;endgraph;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;ods listing close;&lt;BR /&gt;ods listing;&lt;BR /&gt;proc sgrender data=Data_Tbl template=StkdClstrBr;&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Apr 2016 18:39:20 GMT</pubDate>
    <dc:creator>Jay54</dc:creator>
    <dc:date>2016-04-28T18:39:20Z</dc:date>
    <item>
      <title>Place bar graph data in group order</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Place-bar-graph-data-in-group-order/m-p/267071#M9573</link>
      <description>&lt;P&gt;Cannot seem to figure out how to place the group bars in order of red yellow green and blue, places by data magnitude instead of data sort or group name. &amp;nbsp;Is there a way to do it by group name or data sort.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data Data_Tbl;&lt;BR /&gt;attrib &lt;BR /&gt; SntmntType informat=$20.&lt;BR /&gt; Source informat=$20.&lt;BR /&gt;;&lt;BR /&gt;infile datalines delimiter='09'x dsd firstobs=1; &lt;BR /&gt;input SntmntType $ Source $ Column1;&lt;BR /&gt;datalines;&lt;BR /&gt;Ovrll StsfctnPrcnt_1 -0.384&lt;BR /&gt;Ovrll StsfctnPrcnt_2 -0.046&lt;BR /&gt;Ovrll StsfctnPrcnt_3 0.224&lt;BR /&gt;Ovrll StsfctnPrcnt_4 0.346&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;proc template;&lt;BR /&gt; define statgraph StkdClstrBr;&lt;BR /&gt; begingraph / datacolors=(verylightred verylightyellow verylightgreen lightblue);&lt;BR /&gt; entrytitle '';&lt;BR /&gt; layout overlay / xaxisopts=(Label=" ") yaxisopts=(Label=" ");&lt;BR /&gt; barchart x=SntmntType y=Column1 / orient=horizontal grouporder=data group=Source&lt;BR /&gt; name='a';&lt;BR /&gt; discretelegend 'a';&lt;BR /&gt; endlayout;&lt;BR /&gt; endgraph;&lt;BR /&gt; end;&lt;BR /&gt;run;&lt;BR /&gt;proc sgrender data=Data_Tbl template=StkdClstrBr;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2016 18:18:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Place-bar-graph-data-in-group-order/m-p/267071#M9573</guid>
      <dc:creator>Bryan</dc:creator>
      <dc:date>2016-04-28T18:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: Place bar graph data in group order</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Place-bar-graph-data-in-group-order/m-p/267073#M9574</link>
      <description>&lt;P&gt;I see a few issues with your code. &amp;nbsp;I had to change the attributes to read in the data correctly. &amp;nbsp;Your data has only 1 category value (X=SntmntType) and 4 groups. &amp;nbsp;Default GroupDisplay is STACK. &amp;nbsp;If you want these side by side, use GroupDisplay=CLUSTER. &amp;nbsp;To get them in the order you want, you have to order the values yourself in the data, using&amp;nbsp;grouporder=data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data Data_Tbl;&lt;BR /&gt;attrib &lt;BR /&gt;/*SntmntType informat=$15.*/&lt;BR /&gt;Source informat=$15.&lt;BR /&gt;;&lt;BR /&gt;/*infile datalines delimiter='09'x dsd firstobs=1; */&lt;BR /&gt;input SntmntType $ Source $ Column1;&lt;BR /&gt;datalines;&lt;BR /&gt;Ovrll StsfctnPrcnt_1 -0.384&lt;BR /&gt;Ovrll StsfctnPrcnt_2 -0.046&lt;BR /&gt;Ovrll StsfctnPrcnt_3 0.224&lt;BR /&gt;Ovrll StsfctnPrcnt_4 0.346&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;proc print;run;&lt;/P&gt;
&lt;P&gt;proc template;&lt;BR /&gt;define statgraph StkdClstrBr;&lt;BR /&gt;begingraph / datacolors=(verylightred verylightyellow verylightgreen lightblue);&lt;BR /&gt;entrytitle '';&lt;BR /&gt;layout overlay / xaxisopts=(Label=" ") yaxisopts=(Label=" ");&lt;BR /&gt;barchart x=SntmntType y=Column1 / orient=horizontal grouporder=data group=Source&lt;BR /&gt;name='a';&lt;BR /&gt;discretelegend 'a';&lt;BR /&gt;endlayout;&lt;BR /&gt;endgraph;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;ods listing close;&lt;BR /&gt;ods listing;&lt;BR /&gt;proc sgrender data=Data_Tbl template=StkdClstrBr;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2016 18:39:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Place-bar-graph-data-in-group-order/m-p/267073#M9574</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2016-04-28T18:39:20Z</dc:date>
    </item>
  </channel>
</rss>

