Below is the code I'm using, I will attach a work doc with the output. I'm trying to order the graph on the x axis. I tried a variable named sort but I'd like to have the dates as labels and I couldn't get the output to look the way I wanted. I added a number to preface the dates, it's working but I don't like the way it looks. So if there is an easy way to sort the x axis without labeling what the sort order is that would be a big help. Also notice the height of the bars do not coincide with the hight of the labels. When I started this I thought both would be an easy fix but I can't find anything.
I also tried formating the dates as date9. but the values changed in the gchart step. Here's my code:
proc freq data=mdj._1l_threshold_report_&monyear noprint;table 'Pass/Fail'n / out=Current; proc freq data=mdj._1l_threshold_report_&p_monyear noprint;table pass_fail / out=previous; proc freq data=mdj._1l_threshold_report_&p_monyear2 noprint;table pass_fail / out=previous2; goptions reset=all cback=white border htitle=11pt htext=11pt; proc sql; create table graph_prep as select catx(' ','3)',"&Current") as Date ,count,'Pass/Fail'n from Current union select catx(' ','2)',"&previous") as Date ,count,pass_fail as 'Pass/Fail'n from previous union select catx(' ','1)',"&previous2") as Date ,count,pass_fail as 'Pass/Fail'n from previous2 order by date; data HE_Graph; length function color text $ 8 style $ 20; retain function 'label' color 'black' when 'a' xsys ysys '2' position 'E' size 3 hsys '3'; set graph_prep; style="'Albany AMT'"; midpoint=date; subgroup='Pass/Fail'n; text = count; /* text=left(put(sales,dollar8.));*/ run; /* Define axis characteristics */ axis1 minor=none;* label=(count); /* Add a title to the graph */ title 'Executive Summary'; /* Produce the bar chart using the ANNO= */ /* option on the VBAR statement. */ proc gchart data=graph_prep; vbar date / sumvar=count raxis=axis1 nozero anno=HE_Graph subgroup='Pass/Fail'n width=12 space=3; run; quit;
... View more