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 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

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