/*--Survey Data--*/ data survey; length question $ 100; input response question $8-105; format response percent5.1; datalines; 0.724 A better understanding of how SAS technology and solutions are already being used at my company 0.448 A chance to get my questions answered by SAS expert 0.759 Information about new SAS technologies and solutions of interest to my company 0.621 An awareness of the many resources and services available to my company as a SAS customer 0.586 A chance to connect with other SAS users at my organization 0.035 Other ; run; /*proc print;run;*/ /*--Survey Data with breaks--*/ data survey2; length question $ 100; input response question $8-105; format response percent5.1; datalines; 0.724 A better understanding ^of how SAS technology and ^solutions are already being ^used at my company 0.448 A chance to get my questions ^answered by SAS expert 0.759 Information about new SAS ^technologies and solutions ^of interest to my company 0.621 An awareness of the ^many resources and services ^available to my company ^as a SAS customer 0.586 A chance to connect ^with other SAS users ^at my organization 0.035 Other ; run; /*proc print;run;*/ %let gpath='C:\'; %let dpi=200; ods html close; ods listing gpath=&gpath image_dpi=&dpi; /*--VBar--*/ ods graphics / reset width=5in height=3in imagename='Survey_Vert'; proc sgplot data=survey; title 'What value did you gain from this event?'; vbar question / response=response nostatlabel dataskin=gloss datalabel; xaxis display=(nolabel) valueattrs=(size=7); yaxis display=(nolabel) valueattrs=(size=7) grid; run; proc template; define statgraph Survey_GTL; begingraph; entrytitle 'What value did you gain from this event?'; layout overlay / xaxisopts=(display=(ticks tickvalues) tickvalueattrs=(size=8)) yaxisopts=(reverse=true display=(ticks tickvalues) tickvalueattrs=(size=8) discreteopts=(tickvaluefitpolicy=split)); barchart category=question response=response / orient=horizontal fillattrs=graphdata2 dataskin=gloss barlabel=true; endlayout; endgraph; end; run; /*--GTL HBar with default split width--*/ ods graphics / reset width=5in height=3in imagename='Survey_GTL_1'; proc sgrender data=survey template=Survey_GTL; run; proc template; define statgraph Survey_GTL_2; begingraph; entrytitle 'What value did you gain from this event?'; layout overlay / xaxisopts=(display=(ticks tickvalues) tickvalueattrs=(size=7)) yaxisopts=(reverse=true display=(ticks tickvalues) tickvalueattrs=(size=7) discreteopts=(tickvaluefitpolicy=splitalways tickvaluesplitchar='^')); barchart category=question response=response / orient=horizontal fillattrs=graphdata3 dataskin=gloss barlabel=true; endlayout; endgraph; end; run; /*--GTL HBar with specific split characters--*/ ods graphics / reset width=5in height=3in imagename='Survey_GTL_2'; proc sgrender data=survey2 template=Survey_GTL_2; run;