Hi,
I am trying to annotate a simple line of text using %LABEL, along with the HTML= option, but can not
get the link to work. The following codewill create the image with the text, but the hotspt doesn't function.
Any idea on what Imay be missing ?
Thanks
Data anno_in_link2;
%dclanno;
length function $8 ;
length html $300 ;
style='solid';
xsys='3';
ysys='3';
hsys='3';
when='a';
html='HREF=http://www.google.com';
%label(90,90,"Text hotspot here",black,0,0,4,'Arial',<); output;
Run;
Proc ganno anno=anno_in_link2
imagemap=annomap;
run; quit;
Are you writing the output to an html file (such as, using ods html), and then viewing it in a browser?
Yes... I'm attempting to. I'm using DEV=gif , but the ouput is creating 'ganno.gif', and does not display the 'anno_test.htm' file.
ods listing close;
ODS HTML path=odsout
body="anno_test.htm"
;
The following should work ...
%let name=gan001;
filename odsout '.';
%annomac;
Data anno_in_link2;
%dclanno;
length function $8 ;
length html $300 ;
/*
style='solid';
*/
xsys='3';
ysys='3';
hsys='3';
when='a';
html='HREF="http://www.google.com"';
%label(90,90,"Text hotspot here",black,0,0,4,'Arial',<); output;
Run;
GOPTIONS DEVICE=gif border;
ODS LISTING CLOSE;
ODS HTML path=odsout body="&name..htm" style=sasweb;
Proc ganno anno=anno_in_link2
imagemap=annomap
des='' name="&name";
run;
proc print data=anno_in_link2;
run;
quit;
ods html close;
ods listing;
That does work. What was the the pimary problem my original code ?
Thanks very much for your help.
I'm not really sure, since I don't know exactly what all code you ran, and in what order, etc.
But you've now got some code that workd
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.