%let gpath=C:\; ods html close; %let w=4in; %let h=2.5in; %let dpi=200; ods listing style=htmlblue gpath="&gpath" image_dpi=&dpi; /*--Bar Chart--*/ ods graphics / reset width=5in height=3in imagename='Bar'; title 'Product Sales by Country'; proc sgplot data=sashelp.prdsale noborder; vbar country / response=actual group=product displaybaseline=auto seglabel datalabel dataskin=gloss filltype=gradient nooutline; yaxis display=(noline noticks nolabel) grid; xaxis display=(noline noticks nolabel) offsetmax=0.3; keylegend / location=inside position=topright across=1 fillheight=10 fillaspect=2 opaque; run; /*--Bar Chart reverse group--*/ ods graphics / reset width=5in height=3in imagename='Bar_Reverse_Group'; title 'Product Sales by Country'; proc sgplot data=sashelp.prdsale noborder; vbar country / response=actual group=product displaybaseline=auto seglabel datalabel dataskin=gloss filltype=gradient nooutline grouporder=reversedata; yaxis display=(noline noticks nolabel) grid; xaxis display=(noline noticks nolabel) offsetmax=0.3; keylegend / location=inside position=topright across=1 fillheight=10 fillaspect=2 opaque; run; /*--Bar Chart Reverse Auto--*/ ods graphics / reset width=5in height=3in imagename='Bar_Reverse_Auto'; title 'Product Sales by Country'; proc sgplot data=sashelp.prdsale noborder; vbar country / response=actual group=product displaybaseline=auto seglabel datalabel dataskin=gloss filltype=gradient nooutline; yaxis display=(noline noticks nolabel) grid; xaxis display=(noline noticks nolabel) offsetmax=0.3; keylegend / location=inside position=topright across=1 opaque fillheight=10 fillaspect=2 sortorder=reverseauto; run;