BookmarkSubscribeRSS Feed
TomA
Calcite | Level 5


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;

5 REPLIES 5
GraphGuy
Meteorite | Level 14

Are you writing the output to an html file (such as, using ods html), and then viewing it in  a browser?

TomA
Calcite | Level 5

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"

   ;

GraphGuy
Meteorite | Level 14

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;

TomA
Calcite | Level 5

That does work.   What was the the pimary problem my original code ? 

Thanks very much for your help.

GraphGuy
Meteorite | Level 14

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 Smiley Happy

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1490 views
  • 0 likes
  • 2 in conversation