Usage Note 23642: In ODS HTML, how can I add a drill down to my graph?
You can add a drill down to a graph by creating the
hyperlink and using the HTML= option on the VBAR/HBAR/PLOT statement.
Below is some sample code.
data regsales;
length Region State $ 8;
format Sales dollar8.;
input Region State Sales;
length rpt $60; /* the HTML variable */
/* assign HREF values to HTML variable */
if Region='Central' then
rpt='HREF="central.html#central"';
else if Region='South' then
rpt='HREF="south.html#south"';
else if Region='West' then
rpt='HREF="west.html#west"';
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
;
run;
goptions device=gif transparency noborder
xpixels=450 ypixels=400;
/* open the html destination for ODS output */
ods html body='sales.html' ;
/* create a chart that uses HTML variable */
title1 'Company Sales';
proc gchart data=regsales;
vbar3d region / sumvar=sales
patternid=midpoint
html=rpt;
run;
quit;
ods html close;
/* open a body file for report */
/* on central sales */
ods html body='central.html' ;
title1 'Central Sales';
proc print data=regsales noobs;
var state sales;
where region='Central';
run;
/* open a body file for report */
/* on southern sales */
title1 'Southern Sales';
ods html close;
ods html body='south.html' ;
proc print data=regsales noobs;
var state sales;
where region='South';
run;
/* open a body file for report */
/* on western sales */
title1 'Western Sales';
ods html close;
ods html body='west.html' ;
proc print data=regsales noobs;
var state sales;
where region='West';
run;
See also the full PROC TEMPLATE FAQ and Concepts.
Operating System and Release Information
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Usage Note |
Priority: | low |
Topic: | SAS Reference ==> ODS (Output Delivery System) Third Party ==> Output ==> HTML
|
Date Modified: | 2004-01-09 12:25:05 |
Date Created: | 2004-01-06 14:56:17 |