<?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: how to get month names not sorted alphabetically in the graph in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/how-to-get-month-names-not-sorted-alphabetically-in-the-graph/m-p/121763#M4700</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Once the data is in actual "date" format, you can then use any date format you want&lt;/P&gt;&lt;P&gt;(such as the month name), and the bars will be in proper (date) order, no matter what&lt;/P&gt;&lt;P&gt;the formatted text of the date turns out to be...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data foo;&lt;BR /&gt;input bar_date date9. sales;&lt;BR /&gt;datalines;&lt;BR /&gt;12jan2012 550&lt;BR /&gt;12feb2012 600&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc gchart data=foo;&lt;BR /&gt;format bar_date monname3.;&lt;BR /&gt;vbar bar_date / discrete&lt;BR /&gt; type=sum sumvar=sales;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Oct 2012 12:25:12 GMT</pubDate>
    <dc:creator>GraphGuy</dc:creator>
    <dc:date>2012-10-04T12:25:12Z</dc:date>
    <item>
      <title>how to get month names not sorted alphabetically in the graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-get-month-names-not-sorted-alphabetically-in-the-graph/m-p/121760#M4697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to create a graph with gchart , i need to get Jan-12,Feb-12.....Dec-12 in X-axis ,but i am getting like Apr-12,Aug-12,Feb-12..so on(which is by default giving in ascending order). I want to change this order and i tried with proc gchart NOTSORTED option but it didn't work out. I have month variable which is having values like (january, February,....December) and i have created a format with&amp;nbsp; labels for month values as &lt;/P&gt;&lt;P&gt;(Jan-12, Feb-12....Dec-12).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sample code;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc gchart data=chart1;&lt;/P&gt;&lt;P&gt; by notsorted month;&lt;/P&gt;&lt;P&gt;format month $month_name.;&lt;/P&gt;&lt;P&gt;vbar month/sumvar=sales&lt;/P&gt;&lt;P&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; midpoints=('01JAN2012'd to '31DEC2012'd)&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it doesn't yield the result&amp;nbsp; Please find the attached image for the sample output that i am getting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vish&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/11852i33BB38909EECAA58/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="SampleOutput.JPG" title="SampleOutput.JPG" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2012 12:08:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-get-month-names-not-sorted-alphabetically-in-the-graph/m-p/121760#M4697</guid>
      <dc:creator>Vish33</dc:creator>
      <dc:date>2012-09-14T12:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: how to get month names not sorted alphabetically in the graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-get-month-names-not-sorted-alphabetically-in-the-graph/m-p/121761#M4698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;legend1 &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; order=('Jan-12' 'Feb-12' ...'Dec-12');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc gchart data=chart1;&lt;/P&gt;&lt;P&gt;format month $month_name.;&lt;/P&gt;&lt;P&gt;vbar month/sumvar=sales&lt;/P&gt;&lt;P&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; midpoints=('01JAN2012'd to '31DEC2012'd)&lt;/P&gt;&lt;P&gt;&amp;nbsp; legend=legend1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2012 12:31:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-get-month-names-not-sorted-alphabetically-in-the-graph/m-p/121761#M4698</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-09-14T12:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: how to get month names not sorted alphabetically in the graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-get-month-names-not-sorted-alphabetically-in-the-graph/m-p/121762#M4699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When using date values in bar charts, I usually tell it to treat the dates as 'discrete' values.&amp;nbsp; Otherwise it will want to do grouping/binning of the underlying numeric values that represent the dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following code should get you started:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data foo;&lt;/P&gt;&lt;P&gt;input bar_date date9. sales;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;12jan2012 550&lt;/P&gt;&lt;P&gt;12feb2012 600&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc gchart data=foo;&lt;/P&gt;&lt;P&gt;format bar_date date9.;&lt;/P&gt;&lt;P&gt;vbar bar_date / discrete&lt;/P&gt;&lt;P&gt;type=sum sumvar=sales;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2012 12:36:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-get-month-names-not-sorted-alphabetically-in-the-graph/m-p/121762#M4699</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2012-09-14T12:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: how to get month names not sorted alphabetically in the graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-get-month-names-not-sorted-alphabetically-in-the-graph/m-p/121763#M4700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Once the data is in actual "date" format, you can then use any date format you want&lt;/P&gt;&lt;P&gt;(such as the month name), and the bars will be in proper (date) order, no matter what&lt;/P&gt;&lt;P&gt;the formatted text of the date turns out to be...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data foo;&lt;BR /&gt;input bar_date date9. sales;&lt;BR /&gt;datalines;&lt;BR /&gt;12jan2012 550&lt;BR /&gt;12feb2012 600&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc gchart data=foo;&lt;BR /&gt;format bar_date monname3.;&lt;BR /&gt;vbar bar_date / discrete&lt;BR /&gt; type=sum sumvar=sales;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2012 12:25:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-get-month-names-not-sorted-alphabetically-in-the-graph/m-p/121763#M4700</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2012-10-04T12:25:12Z</dc:date>
    </item>
  </channel>
</rss>

