<?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: Bar Chart - How to order data groups in each bar? in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Bar-Chart-How-to-order-data-groups-in-each-bar/m-p/48642#M6310</link>
    <description>Thanks Scott, I will give this a try.</description>
    <pubDate>Fri, 19 Sep 2008 16:51:45 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2008-09-19T16:51:45Z</dc:date>
    <item>
      <title>Bar Chart - How to order data groups in each bar?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Bar-Chart-How-to-order-data-groups-in-each-bar/m-p/48638#M6306</link>
      <description>I have a bar chart that shows revenue by different segments for each hour in a day.  I would like to order each hours revenue data in the bar chart by segment in ascending order.  I have pre-sorted the data so that the data is sorted by Time/Date then by Revenue but when I get to PROC GCHART and run the bar chart, each hour is sorted by the Revenue Segment Name, not the Revenue number.&lt;BR /&gt;
&lt;BR /&gt;
Can I tell it to use the data order (ORDER=DATA) so that my pre-sorted data is preserved in the bar chart?&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
B</description>
      <pubDate>Fri, 19 Sep 2008 16:12:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Bar-Chart-How-to-order-data-groups-in-each-bar/m-p/48638#M6306</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-09-19T16:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: Bar Chart - How to order data groups in each bar?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Bar-Chart-How-to-order-data-groups-in-each-bar/m-p/48639#M6307</link>
      <description>Share your GCHART code please, and ideally some data sample for detail.  I know that GCHART stacked-bar "segments" are sorted alphabetically, and so you must use either a SAS PROC FORMAT to map your desired segment order or hardcode the list in your AXIS statement(s), as desired.&lt;BR /&gt;
&lt;BR /&gt;
Here's a Google advanced search argument which will generate some interesting technical paper, and other DOC references on the SAS support website  &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt; for your reference:&lt;BR /&gt;
&lt;BR /&gt;
+gchart +axis +bar +segment +order site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Fri, 19 Sep 2008 16:24:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Bar-Chart-How-to-order-data-groups-in-each-bar/m-p/48639#M6307</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2008-09-19T16:24:07Z</dc:date>
    </item>
    <item>
      <title>Re: Bar Chart - How to order data groups in each bar?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Bar-Chart-How-to-order-data-groups-in-each-bar/m-p/48640#M6308</link>
      <description>Thanks Scott.  See below (FYI - I am using EG and SAS Code to get the desired formatted bar charts).&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
PROC SORT&lt;BR /&gt;
	DATA=SASUSER.QUERY9255	OUT=WORK.SORTTempTableSorted&lt;BR /&gt;
	;&lt;BR /&gt;
	BY Time_Interval_S DESCENDING CONGESTION_REVENUE&lt;BR /&gt;
	;&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
GOPTIONS CBACK=WHITE xpixels=&amp;amp;_EGCHARTWIDTH pixels=&amp;amp;_EGCHARTHEIGHT;&lt;BR /&gt;
	GOPTIONS COLORS = (.....);&lt;BR /&gt;
&lt;BR /&gt;
Legend1&lt;BR /&gt;
	FRAME&lt;BR /&gt;
	LABEL=('Congestion Name')&lt;BR /&gt;
	&lt;BR /&gt;
	;&lt;BR /&gt;
Axis1&lt;BR /&gt;
	STYLE=1&lt;BR /&gt;
	WIDTH=1&lt;BR /&gt;
	MINOR=NONE&lt;BR /&gt;
	LABEL=('Congestion Cost' HEIGHT=8pt)&lt;BR /&gt;
	VALUE=(HEIGHT=8pt)&lt;BR /&gt;
&lt;BR /&gt;
;&lt;BR /&gt;
Axis2&lt;BR /&gt;
	STYLE=1&lt;BR /&gt;
	WIDTH=1&lt;BR /&gt;
	MAJOR=(Number=12)&lt;BR /&gt;
	LABEL=(HEIGHT=8pt)&lt;BR /&gt;
	VALUE=(HEIGHT=6pt)&lt;BR /&gt;
	MINOR=NONE&lt;BR /&gt;
&lt;BR /&gt;
;&lt;BR /&gt;
Axis3&lt;BR /&gt;
&lt;BR /&gt;
;&lt;BR /&gt;
Axis3&lt;BR /&gt;
	STYLE=1&lt;BR /&gt;
	WIDTH=1&lt;BR /&gt;
	MAJOR=(Number=12)&lt;BR /&gt;
&lt;BR /&gt;
PROC GCHART DATA=WORK.SORTTempTableSorted&lt;BR /&gt;
;&lt;BR /&gt;
	VBAR	 Time_Interval_S &lt;BR /&gt;
&lt;BR /&gt;
 / &lt;BR /&gt;
	SUMVAR=Congestion_Revenue &lt;BR /&gt;
	SUBGROUP=Congestion_Name&lt;BR /&gt;
	CLIPREF&lt;BR /&gt;
FRAME	DISCRETE&lt;BR /&gt;
&lt;BR /&gt;
	TYPE=SUM&lt;BR /&gt;
	LEGEND=LEGEND1&lt;BR /&gt;
	COUTLINE=BLACK&lt;BR /&gt;
	RAXIS=AXIS1&lt;BR /&gt;
	MAXIS=AXIS2&lt;BR /&gt;
	GAXIS=AXIS3&lt;BR /&gt;
	GAXIS=AXIS3&lt;BR /&gt;
	LREF=1&lt;BR /&gt;
	CREF=BLACK&lt;BR /&gt;
	AUTOREF&lt;BR /&gt;
	&lt;BR /&gt;
;&lt;BR /&gt;
&lt;BR /&gt;
FORMAT Time_Interval_S DATETIME10.0;&lt;BR /&gt;
LABEL Time_Interval_S="Date/Time"&lt;BR /&gt;
;&lt;BR /&gt;
	&lt;BR /&gt;
/* -------------------------------------------------------------------&lt;BR /&gt;
   End of task code.&lt;BR /&gt;
   ------------------------------------------------------------------- */&lt;BR /&gt;
RUN; QUIT;</description>
      <pubDate>Fri, 19 Sep 2008 16:34:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Bar-Chart-How-to-order-data-groups-in-each-bar/m-p/48640#M6308</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-09-19T16:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: Bar Chart - How to order data groups in each bar?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Bar-Chart-How-to-order-data-groups-in-each-bar/m-p/48641#M6309</link>
      <description>The GCHART/VBAR parameter SUBGROUP=Congestion_Name controls the bar segment order alphabetically, as mentioned in the DOC.  If you want your segments to be ordered otherwise, you will need to build a SAS format, such as a numeric ranking variable, based on CONGESTION_REVENUE, and display the variable value Congestion_Name as the "formatted" variable in your chart.  Then apply your formatted value for variable CONGESTION_REVENUE for your SUBGROUP= parameter.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Fri, 19 Sep 2008 16:43:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Bar-Chart-How-to-order-data-groups-in-each-bar/m-p/48641#M6309</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2008-09-19T16:43:55Z</dc:date>
    </item>
    <item>
      <title>Re: Bar Chart - How to order data groups in each bar?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Bar-Chart-How-to-order-data-groups-in-each-bar/m-p/48642#M6310</link>
      <description>Thanks Scott, I will give this a try.</description>
      <pubDate>Fri, 19 Sep 2008 16:51:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Bar-Chart-How-to-order-data-groups-in-each-bar/m-p/48642#M6310</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-09-19T16:51:45Z</dc:date>
    </item>
  </channel>
</rss>

