<?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: Proc Gchart -Order the Variables on the Xaxis in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Gchart-Order-the-Variables-on-the-Xaxis/m-p/187900#M6927</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you want things to appear in numeric order, use numbers. I'm betting you coded status bucket as a character variable with actual values of "$0.01 - $0.24". Which was likely a step that actually isn't needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have a prior dataset with a status numeric value you likely can use that variable by applying a numeric custom format as Gchart will use formatted values for display.&lt;/P&gt;&lt;P&gt;The format would look like assuming the variable is decimal, 0.01 = $.01, if actually cents then remove the decimals in the format:&lt;/P&gt;&lt;P&gt;proc format;&lt;/P&gt;&lt;P&gt;value bucket&lt;/P&gt;&lt;P&gt;0.01 - 0.24 = '$0.01 - $0.24'&lt;/P&gt;&lt;P&gt;0.25&amp;nbsp; - 0.49 = '$0.25 - $0.49'&lt;/P&gt;&lt;P&gt;&amp;lt;contine the hopefully obvious pattern&amp;gt;&lt;/P&gt;&lt;P&gt;500 - high = '$500.00 - Max'&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;Or use numeric groups and format the group variable.&lt;/P&gt;&lt;P&gt;Then associate the format with your value variable in the proc gchart code:&lt;/P&gt;&lt;P&gt;format variable bucket.;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above approach is VERY useful because you can create multiple bucket type formats and only change the format statement to see how different groups behave instead of creating multiple bucket variables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Apr 2014 19:04:10 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2014-04-21T19:04:10Z</dc:date>
    <item>
      <title>Proc Gchart -Order the Variables on the Xaxis</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Gchart-Order-the-Variables-on-the-Xaxis/m-p/187899#M6926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;I am using a Proc Gchart to generate a graph with status_buckets along the xaxis and their Statuses (Pending Delivered Returned) of the each bucket on Y axis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;This is the piece of code i am using to generate the graph.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;proc gchart data = Prep_File_Final_1;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;vbar status_bucket/noframe descending type=pct subgroup=Status legend=legend1 inside=pct&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;g100 group=status_bucket &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;nozero raxis=axis1 maxis=axis2 gaxis=axis3 ;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;run;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;As of now the graph plots Status_bucket values like this:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;$0.01 - $0.24,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $0.25 - $0.49,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $0.50 - $0.99,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $1.00 - $4.99,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $10.00 - $24.99,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $100.00 - $499.99&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $25.00 - $49.99,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $5.00 - $9.99,&amp;nbsp; $50.00 - $99.99,&amp;nbsp;&amp;nbsp; $500.00 - Max&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;i would like to get the values plotted in this order on the x axis :&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;$0.01 - $0.24,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $0.25 - $0.49,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $0.50 - $0.99,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $1.00 - $4.99,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $5.00 - $9.99,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $10.00 - $24.99,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $25.00 - $49.99,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $50.00 - $99.99,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $100.00 - $499.99,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $500.00 - Max&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Apr 2014 16:34:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Gchart-Order-the-Variables-on-the-Xaxis/m-p/187899#M6926</guid>
      <dc:creator>skyrocket</dc:creator>
      <dc:date>2014-04-21T16:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Gchart -Order the Variables on the Xaxis</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Gchart-Order-the-Variables-on-the-Xaxis/m-p/187900#M6927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you want things to appear in numeric order, use numbers. I'm betting you coded status bucket as a character variable with actual values of "$0.01 - $0.24". Which was likely a step that actually isn't needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have a prior dataset with a status numeric value you likely can use that variable by applying a numeric custom format as Gchart will use formatted values for display.&lt;/P&gt;&lt;P&gt;The format would look like assuming the variable is decimal, 0.01 = $.01, if actually cents then remove the decimals in the format:&lt;/P&gt;&lt;P&gt;proc format;&lt;/P&gt;&lt;P&gt;value bucket&lt;/P&gt;&lt;P&gt;0.01 - 0.24 = '$0.01 - $0.24'&lt;/P&gt;&lt;P&gt;0.25&amp;nbsp; - 0.49 = '$0.25 - $0.49'&lt;/P&gt;&lt;P&gt;&amp;lt;contine the hopefully obvious pattern&amp;gt;&lt;/P&gt;&lt;P&gt;500 - high = '$500.00 - Max'&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;Or use numeric groups and format the group variable.&lt;/P&gt;&lt;P&gt;Then associate the format with your value variable in the proc gchart code:&lt;/P&gt;&lt;P&gt;format variable bucket.;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above approach is VERY useful because you can create multiple bucket type formats and only change the format statement to see how different groups behave instead of creating multiple bucket variables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Apr 2014 19:04:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Gchart-Order-the-Variables-on-the-Xaxis/m-p/187900#M6927</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-04-21T19:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Gchart -Order the Variables on the Xaxis</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-Gchart-Order-the-Variables-on-the-Xaxis/m-p/187901#M6928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Apr 2014 19:12:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-Gchart-Order-the-Variables-on-the-Xaxis/m-p/187901#M6928</guid>
      <dc:creator>skyrocket</dc:creator>
      <dc:date>2014-04-21T19:12:01Z</dc:date>
    </item>
  </channel>
</rss>

