%let gpath='C:\'; %let dpi=200; ods html close; data scheduleLine; input Item $1-30 Group $31-40 Start End; format Start End Start2 End2 Line_x monyy7.; informat Start End date9.; start2=start+30; end2=end+30; Line_x=start; output; Line_x=end; start=.; end=.; output; datalines; Draft Environmental Document Baseline 01Jun2005 01Mar2008 Final Environmental Document Baseline 01Mar2008 01Mar2009 Design Right-of-way Acquision Baseline 01Mar2009 01Jan2012 Award Construction Contract Baseline 01Jan2012 01Apr2012 Construction Baseline 01Apr2012 01Jan2015 Closeout Baseline 01Jan2015 01Jan2018 Draft Environmental Document Current 01Jan2006 01Jun2011 Final Environmental Document Current 01Jun2011 01Oct2011 Design Right-of-way Acquision Current 01Oct2011 01Nov2011 Award Construction Contract Current 01Nov2011 01May2012 Construction Current 01May2012 01Jan2015 Closeout Current 01Jan2015 01Jan2018 ; run; ods html; proc print noobs; var item group start end Line_x; run; ods html close; %modstyle (name=schedule, parent=htmlblue, colors=cxAC9411 cx315cb0, fillcolors=cxFCB441 cx418cf0); run; ods listing style=schedule gpath=&gpath image_dpi=&dpi; /*--Basic Schedule Chart--*/ ods graphics / reset width=5in height=3in imagename='Schedule_Line_94_1'; proc sgplot data=scheduleLine(where=(group eq 'Baseline')) noautolegend; title 'Schedule for Mid-Atlantic Light Rail (SAS 9.4)'; highlow y=item low=start2 high=end2 / type=bar barwidth=0.6 discreteoffset=0.05 fillattrs=(color=lightgray) nooutline; series y=Item x=Line_x / lineattrs=(thickness=3); highlow y=item low=start high=end / type=bar barwidth=0.6; yaxis reverse display=(nolabel) colorbands=odd colorbandsattrs=(transparency=0.4) fitpolicy=splitalways valueattrs=(size=7); xaxis display=(nolabel) grid; /* keylegend 'a' / location=inside position=topright across=1;*/ run; /*--Grouped Schedule Chart with Connecting Lines--*/ ods graphics / reset width=5in height=3in imagename='Schedule_Line_94_2'; proc sgplot data=scheduleLine; title 'Schedule for Mid-Atlantic Light Rail (SAS 9.4)'; highlow y=item low=start2 high=end2 / type=bar barwidth=0.75 discreteoffset=0.05 fillattrs=(color=lightgray) nooutline group=group groupdisplay=cluster; series y=Item x=Line_x / group=group lineattrs=(thickness=3) groupdisplay=cluster; highlow y=item low=start high=end / group=group type=bar barwidth=0.75 groupdisplay=cluster name='a' lineattrs=(color=black); yaxis reverse display=(nolabel) colorbands=odd colorbandsattrs=(transparency=0.4) fitpolicy=splitalways valueattrs=(size=7); xaxis display=(nolabel) grid; keylegend 'a' / location=inside position=topright across=1 opaque; run; /*--Step does not work as it does not support Category Y axis.--*/ ods graphics / reset width=5in height=3in imagename='Schedule_Line_94_2'; proc sgplot data=scheduleLine; title 'Schedule for Mid-Atlantic Light Rail (SAS 9.4)'; highlow y=item low=start2 high=end2 / type=bar barwidth=0.75 discreteoffset=0.05 fillattrs=(color=lightgray) nooutline group=group groupdisplay=cluster; step y=Item x=end / group=group lineattrs=(thickness=3) groupdisplay=cluster; highlow y=item low=start high=end / group=group type=bar barwidth=0.75 groupdisplay=cluster name='a' lineattrs=(color=black); yaxis reverse display=(nolabel) colorbands=odd colorbandsattrs=(transparency=0.4) fitpolicy=splitalways valueattrs=(size=7); xaxis display=(nolabel) grid; keylegend 'a' / location=inside position=topright across=1 opaque; run;