Sample 24868: Place a reference line in front of the bars with PROC GCHART
This sample uses the FRONTREF option on the VBAR3D statement of PROC GCHART to indicate that reference lines should appear in front of the bars. The default location for reference lines is behind the bars.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample uses the FRONTREF option on the VBAR3D statement of PROC GCHART to indicate that reference lines should appear in front of the bars. The default location for reference lines is behind the bars.
The graphics output in the Results tab was produced using SASĀ® 9.2. Submitting the sample code with releases of SAS prior to SAS 9.2 might produce different results.
/* Set the graphics environment */
goptions reset=all border cback=white htitle=12pt;
/* Create a data set for charting */
data a;
input YEAR 4. CNT;
datalines;
1997 25
1998 30
1999 20
2000 10
2001 60
;
run;
title1 'Reference Line In Front';
/* Modify the response axis */
axis1 minor=none label=('CNT') offset=(0,0);
/* Use the FRONTREF option to place reference lines */
/* in front of the bars */
proc gchart data=a;
vbar3d YEAR / sumvar=CNT discrete raxis=axis1
subgroup=year nolegend
coutline=black width=8 space=3
vref=20 cref=black inside=sum frontref;
run;
quit;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample uses the FRONTREF option on the VBAR3D statement of PROC GCHART to indicate that reference lines should appear in front of the bars. The default location for reference lines is behind the bars.
Type: | Sample |
Topic: | SAS Reference ==> Procedures ==> GCHART Query and Reporting ==> Creating Reports ==> Graphical ==> Graph Types ==> Charts ==> Bar
|
Date Modified: | 2005-08-24 16:06:25 |
Date Created: | 2004-11-11 11:07:52 |
Operating System and Release Information
SAS System | SAS/GRAPH | All | n/a | n/a |