Date: Mon, 20 Dec 2004 10:50:33 -0500
Reply-To: "Michael S. Zdeb" <msz03@HEALTH.STATE.NY.US>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Michael S. Zdeb" <msz03@HEALTH.STATE.NY.US>
Subject: Re: Question about inserting an html link between a title
statement and a Proc GChart.
Content-type: text/plain; charset=US-ASCII
Hi. You can add links with annotation...here's an example...you can
'guess' where your titles will be (I used the graphics output area
coordinate system to place the annotate link)...
data anno;
retain
xsys ysys hsys '3'
color 'red'
style '"Arial/bo"'
size 2
;
x = 50;
y = 90;
text = 'CLICK HERE TO DRILL DOWN TO ADDITIONAL INFORMATION';
html = 'HREF="z:\link.htm"';
run;
goptions
reset=all
device=gif
ftext='Arial/bo'
gunit=pct
gsfname=gout
;
title1 h=5 'THIS IS TITLE 1';
title2 h=3 'THIS IS TITLE 2';
filename gout 'z:\test.gif';
ods html file='z:\test.htm';
proc gslide annotate=anno;
run;
quit;
ods html close;
Mike Zdeb
U@Albany School of Public Health
1 University Drive
Rensselaer, NY 12144-3456
(P)518-402-6479
(F)630-604-1475
|---------+---------------------------->
| | "Thomas, Robert G|
| | (Bob)" |
| | <RPT7@CDC.GOV> |
| | Sent by: "SAS(r) |
| | Discussion" |
| | <SAS-L@LISTSERV.U|
| | GA.EDU> |
| | |
| | |
| | 12/20/2004 09:31 |
| | AM |
| | Please respond to|
| | "Thomas, Robert G|
| | (Bob)" |
| | |
|---------+---------------------------->
>----------------------------------------------------------------------------------------------------------------------|
| |
| To: SAS-L@LISTSERV.UGA.EDU |
| cc: |
| Subject: Question about inserting an html link between a title statement and a Proc GChart. |
>----------------------------------------------------------------------------------------------------------------------|
SAS-L:,
I have a SAS/intrnet (CGI-Broker) program that generates an
HTML page. I want to add an HTML link at the top of a
chart produced by Proc Gchart.
The link would ideally go right below the text produced by
the TITLE2 statement (Run report on full 4-char ICD code:).
Can a TITLE statement generate an HTML Link?
Can the ANNOTATE file put a link somewhere at the top of
the page?
Is the Data Step Graphics Interface (DSGI) a possible
solution?
Will the ODS ESCAPECHAR = parameter help?
Any suggestions would be appreciated!
Here is an abbreviated version of the code so far:
*** make annotate file to put percentages beside
the bars;;
data annotate_file;
length function color style $ 8 percent 8 midpoint
$6 text $ 50;
retain function 'label' color 'black' when 'a'
style 'triplex' xsys ysys '2' position '5' size
1.75 hsys '3';
set charttest (keep= newicd deaths);
percent=(deaths/&totd)*100;
midpoint=newicd; If deaths > 0 then
text=left(put((percent/100),percent7.1)); else
deaths=.;
x=deaths + ((&roundup)*.05); y=deaths/2;
run;
TITLE1 j=c f=triplex h=12 pt c=cx002288 "&injtitle
- &dcause";
TITLE2 j=l f=triplex h=9 pt c=cx002288 " Run
report on full 4-char ICD code:" ;
axis1 label=(j=c "&save_ICDcodeVer" ) ;
axis2 label=(j=c "Number of Deaths" j=l)
major=(color=blue number=10) minor=(number=1)
order=(0 to %eval(&roundup)) by %eval(&roundinc *
2));
proc gchart data=work.charttest;
hbar newicd / discrete sumvar=deaths
midpoints=&midpoints raxis=axis2 maxis=axis1
annotate=annotate_file
cframe="#EEEEEE" autoref clipref
html=drillvar name='lead' des='Leading
Causes of Death';
run;
Bob Thomas
IT Specialist
HHS.CDC.NCIPC.OSP
770-488-1978