In reply to Kelan Li. Yes, correct. For example, the following statements create a stacked bar chart:

title "Use the PCTLEVEL=GROUP Option";
proc sgplot data =cars pctlevel=group; /* <== summarize by groups */
vbar Origin / group=Type groupdisplay=stack stat=pct;
run;

The reason I used PROC FREQ was because I wanted to stack the bars in ascending order by frequency, which is not possible by using the above code. If you use the GROUPORDER= option, you can order the bars alphabetically (increasing or descending) or by their order in the data set, but not by the relative proportions of the subcategories.