The following horizontal
bar chart shows cumulative product orders for a clothing store.
Bar Chart That Shows Cumulative Product Orders
In the SGPLOT procedure,
the HBAR statement specifies the plot to be displayed, which in this
case is a horizontal bar chart. In addition, the statement specifies
the response variable (Number of Items) to be displayed on the horizontal
axis. The response variable is optional. If you do not provide a response
variable, then the chart shows the frequency count on the horizontal
axis. The statement also specifies the statistic for the horizontal
axis. The STAT= option enables you to specify the sum, the mean, or
the frequency for the response variable.
proc sgplot data=sashelp.orsales;
format Quantity comma7.;
hbar Product_Category / response = Quantity stat=sum;
run;
Note also that the SGPLOT
procedure supports the FORMAT statement, along with several other
global SAS statements.