Subset the data for 1995 and generate the vertical bar chart for 1995. The AUTOREF option draws a reference line on the backplane for every major tick mark value. The SUBGROUP= option creates a separate bar segment for each department. The SPACE= option controls the space between the bars. The HTML= option names the variable that contains the targets for the bars. The HTML_LEGEND= option names the variable that contains the targets for the legend values. The GIF files use the catalog entry name specified by the NAME= option.


proc gchart data=newgrain;
  format country $country.;
  where year=1995;
  vbar3d country / sumvar=megtons
  subgroup=type
  autoref
  html=countrydrill
  html_legend=typedrill
  legend=legend1
  space=3
  coutline=black
  maxis=axis3
  raxis=axis2
  name="year95"
  des="Production Breakdown for 1995";
run;
quit;