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: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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