![]() Chapter Contents |
![]() Previous |
![]() Next |
| SAS/GRAPH Software: Reference |
Because the example uses BY-group processing, it generates a separate graph for each value of the BY variable, in this case REGION. Graph Generated with DEVICE=WEBFRAME shows how the output looks when file index.html is viewed in a Web browser.
Graph Generated with DEVICE=WEBFRAME
/* This example uses the WEBFRAME driver */
/* You can modify it to use the HTML driver */
/* This is the only line you have to change */
/* to run the program. Specify */
/* a location in your file system. */
filename webdoc 'path-to-Web-server';
/* Set the general graphics environment */
goptions reset=global gunit=pct
htitle=6 htext=4
ftitle=zapfb ftext=swiss;
/* Specify the webframe device driver */
/* To use the HTML driver, use device=html */
goptions device=webframe gsfname=webdoc
transparency noborder;
/* Create data set REGSALES */
data regsales;
length Region State $ 8;
format Sales dollar8.;
input Region State Sales;
datalines;
West CA 13636
West OR 18988
West WA 14523
Central IL 18038
Central IN 13611
Central OH 11084
Central MI 19660
South FL 14541
South GA 19022
;
/* Sort data by the BY variable */
proc sort data=regsales;
by region;
run;
/* Run the GCHART procedure */
title1 'Regional Sales';
proc gchart data=regsales;
vbar3d state / sumvar=sales
patternid=by;
by region;
run;
quit;
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.