Data visualization with SAS programming

HTML= not working with %label annotation

Reply
Occasional Contributor
Posts: 14

HTML= not working with %label annotation


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;

SAS Employee
Posts: 977

Re: HTML= not working with %label annotation

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

Occasional Contributor
Posts: 14

Re: HTML= not working with %label annotation

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"

   ;

SAS Employee
Posts: 977

Re: HTML= not working with %label annotation

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;

Occasional Contributor
Posts: 14

Re: HTML= not working with %label annotation

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

Thanks very much for your help.

SAS Employee
Posts: 977

Re: HTML= not working with %label annotation

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

Ask a Question
Discussion stats
  • 5 replies
  • 236 views
  • 0 likes
  • 2 in conversation