![]() Chapter Contents |
![]() Previous |
![]() Next |
| SAS/GRAPH Software: Reference |
| Example 8. Creating a Simple Web Page with the ODS HTML Statement | |
| Example 9. Combining Graphs and Reports in a Web Page | |
| Example 10. Creating a Bar Chart with Drill-down for the Web |
/* This program uses ods to create html */
/* and gif output. This is the only line you */
/* have to change to run the program. Specify */
/* a location in your file system. */
filename odsout 'path-to-Web-server';
/* close the listing destination */
ods listing close;
/* set the graphics environment */
goptions reset=global gunit=pct
htitle=6 htext=4 ctext=black
ftitle=zapfb ftext=swiss;
/* 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;
/* assign graphics options for ods output */
goptions device=gif transparency noborder;
/* open html destination for ods output */
ods html body='sales.htm'
contents='saleCont.htm'
frame='saleFram.htm'
path=odsout
newfile=output;
/* Run the gchart procedure */
title1 'Regional Sales';
proc gchart data=regsales;
vbar3d state / sumvar=sales
patternid=by;
by region;
run;
quit;
/* close the html destination */
ods html close;
/* open the listing destination */
ods listing;
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.