<?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: I'm getting multiple occurrences of the same value on the x-axis in GCHART. in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/I-m-getting-multiple-occurrences-of-the-same-value-on-the-x-axis/m-p/483230#M16670</link>
    <description>&lt;P&gt;I suspect that you have actual dates with different days of the month and a MONYY7 format applied. Gchart will attempt, depending on your Proc and Axis options attempt to display tick marks for separate values but with the same format they get the same label.&lt;/P&gt;
&lt;P&gt;Proc freq however honors the format for grouping purposes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should show your entire output proc chart code and any associated AXIS, SYMBOL and PATTERN statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an example of Proc Freq reporting different days of the month as a single "month" for the output.&lt;/P&gt;
&lt;PRE&gt;data example;
   input x mmddyy10.;
   format x date9.;
datalines;
02/01/2018
02/02/2018
;
run;

proc freq data=example;
  tables x;
  format x monyy7.;
run;

/* with default format*/
proc freq data=example;
  tables x;
run;&lt;/PRE&gt;</description>
    <pubDate>Wed, 01 Aug 2018 23:08:02 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-08-01T23:08:02Z</dc:date>
    <item>
      <title>I'm getting multiple occurrences of the same value on the x-axis in GCHART.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/I-m-getting-multiple-occurrences-of-the-same-value-on-the-x-axis/m-p/483220#M16669</link>
      <description>&lt;P&gt;I'm getting multiple occurrences of the same variable (month) on my x-axis in GCHART. However when I run the Proc Freq, it shows that that each month is discrete. I've attached the output for GCHART and for FREQ. The code is below. Thanks for your help! Proc Freq data=All2 ; Tables Month / nocol norow missing ; Run ; Proc GCHART data=All2 ; vbar Month / type = freq ; Run &lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="I'm getting multiple occurrences of each month" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/22154iCC1D98795A40877F/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="I'm getting multiple occurrences of each month" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;I'm getting multiple occurrences of each month&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Proc freq shows the months as discrete" style="width: 245px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/22156i2FACA983F3D1F6A4/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="Proc freq shows the months as discrete" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Proc freq shows the months as discrete&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Aug 2018 22:22:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/I-m-getting-multiple-occurrences-of-the-same-value-on-the-x-axis/m-p/483220#M16669</guid>
      <dc:creator>NancyBerkley</dc:creator>
      <dc:date>2018-08-01T22:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: I'm getting multiple occurrences of the same value on the x-axis in GCHART.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/I-m-getting-multiple-occurrences-of-the-same-value-on-the-x-axis/m-p/483230#M16670</link>
      <description>&lt;P&gt;I suspect that you have actual dates with different days of the month and a MONYY7 format applied. Gchart will attempt, depending on your Proc and Axis options attempt to display tick marks for separate values but with the same format they get the same label.&lt;/P&gt;
&lt;P&gt;Proc freq however honors the format for grouping purposes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should show your entire output proc chart code and any associated AXIS, SYMBOL and PATTERN statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an example of Proc Freq reporting different days of the month as a single "month" for the output.&lt;/P&gt;
&lt;PRE&gt;data example;
   input x mmddyy10.;
   format x date9.;
datalines;
02/01/2018
02/02/2018
;
run;

proc freq data=example;
  tables x;
  format x monyy7.;
run;

/* with default format*/
proc freq data=example;
  tables x;
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Aug 2018 23:08:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/I-m-getting-multiple-occurrences-of-the-same-value-on-the-x-axis/m-p/483230#M16670</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-08-01T23:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: I'm getting multiple occurrences of the same value on the x-axis in GCHART.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/I-m-getting-multiple-occurrences-of-the-same-value-on-the-x-axis/m-p/483344#M16671</link>
      <description>&lt;P&gt;If you're using Proc GChart, try adding the '&lt;STRONG&gt;discrete&lt;/STRONG&gt;' vbar option.&lt;/P&gt;
&lt;P&gt;If that doesn't work, then try also adding the '&lt;STRONG&gt;nozero&lt;/STRONG&gt;' vbar option.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 11:05:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/I-m-getting-multiple-occurrences-of-the-same-value-on-the-x-axis/m-p/483344#M16671</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2018-08-02T11:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: I'm getting multiple occurrences of the same value on the x-axis in GCHART.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/I-m-getting-multiple-occurrences-of-the-same-value-on-the-x-axis/m-p/483481#M16674</link>
      <description>&lt;P&gt;I thought of this, but I am creating the date variable myself from an Excel Data/Time String...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Session Start&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2018-01-02 08:14:00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2018-01-02 08:26:03&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2018-01-02 09:47:01&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="1"&gt;&lt;STRONG&gt;Data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt; Test1 ; &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="1"&gt;Set&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt; Usage.All_Data ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1"&gt;Start_Year_Str = Substr(Session_Start,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="1"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="1"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="1"&gt;4&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="1"&gt;) ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1"&gt;Start_Year = input(Start_Year_Str, &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="1"&gt;8.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="1"&gt;) ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1"&gt;Start_Month_Str = Substr(Session_Start,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="1"&gt;6&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="1"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="1"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="1"&gt;) ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1"&gt;Start_Month = input(Start_Month_Str, &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="1"&gt;8.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="1"&gt;) ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1"&gt;Start_Date = MDY(Start_Month,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="1"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="1"&gt;,Start_Year) ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="1"&gt;Format&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt; Start_DAte &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="1"&gt;MonYY7.&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="1"&gt;&lt;STRONG&gt;Run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="1"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1"&gt;Output:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1"&gt;Session_Start&amp;nbsp;Start_Year_Str&amp;nbsp;Start_Year&amp;nbsp;Start_Month_Str&amp;nbsp;Start_Month&amp;nbsp;Start_Date&lt;BR /&gt;2018-01-02 08:14:00&amp;nbsp;2018&amp;nbsp;2018&amp;nbsp;01&amp;nbsp;1&amp;nbsp;JAN2018&lt;BR /&gt;2018-01-02 08:26:03&amp;nbsp;2018&amp;nbsp;2018&amp;nbsp;01&amp;nbsp;1&amp;nbsp;JAN2018&lt;BR /&gt;2018-01-02 09:47:01&amp;nbsp;2018&amp;nbsp;2018&amp;nbsp;01&amp;nbsp;1&amp;nbsp;JAN2018&lt;BR /&gt;2018-01-02 10:01:37&amp;nbsp;2018&amp;nbsp;2018&amp;nbsp;01&amp;nbsp;1&amp;nbsp;JAN2018&lt;BR /&gt;2018-01-02 13:31:39&amp;nbsp;2018&amp;nbsp;2018&amp;nbsp;01&amp;nbsp;1&amp;nbsp;JAN2018&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="1"&gt;Using the option Discrete as recommended by &lt;A href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13585" target="_self"&gt;&lt;SPAN&gt;RobertAllison_SAS&lt;/SPAN&gt;&lt;/A&gt;&amp;nbsp;did the trick.&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;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 17:02:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/I-m-getting-multiple-occurrences-of-the-same-value-on-the-x-axis/m-p/483481#M16674</guid>
      <dc:creator>NancyBerkley</dc:creator>
      <dc:date>2018-08-02T17:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: I'm getting multiple occurrences of the same value on the x-axis in GCHART.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/I-m-getting-multiple-occurrences-of-the-same-value-on-the-x-axis/m-p/483483#M16675</link>
      <description>"Discrete" did the trick. Thanks so much!</description>
      <pubDate>Thu, 02 Aug 2018 17:03:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/I-m-getting-multiple-occurrences-of-the-same-value-on-the-x-axis/m-p/483483#M16675</guid>
      <dc:creator>NancyBerkley</dc:creator>
      <dc:date>2018-08-02T17:03:46Z</dc:date>
    </item>
  </channel>
</rss>

