Use a LENGTH statement
to set the length of the HTML variable to the longest string that
you need for the link string. Be sure to set the HTML value to a null
if you continue writing observations to the annotate data set after
you are done assigning links. For example, the following code defines
link information for two squares, but then sets the HTML variable
to null when drawing a frame; otherwise the background area within
the frame will use the link information from the last defined HTML
value and become a hot zone in the graph.
data squares;
length function style color $ 8
html text $ 15;
xsys="3"; ysys="3";
/* draw a green square */
color="green";
function="move"; x=10; y=65; output;
function="bar"; x=30; y=95; style="solid";
html="href=green.gif"; output;
/* draw a red square */
color="red";
function="'move"; x=60; y=65; output;
function="bar"; x=80; y=95;
html="href=red.gif"; output;
/* draw a blue frame */
function="frame"; color="blue"; style="empty";
/* set null link for background area in frame */
html=""; output;
run;