BookmarkSubscribeRSS Feed
ccc143
Calcite | Level 5
The following code will produce graphs where the year is on the x axis and the num value will be on the y. I'd like the category value to display 'cat' or 'dog' when I mouse over it. However, this only works when I set "device=javameta", but not when I set "device=activex". I get errors when I try to open the html in javameta, but am able to open the html in activex without errors. Is there a way to get the popup to display the category value ('cat' or 'dog') instead of the axis values when I scroll over it in activex setting?

Thanks!!!



data test1;
input year cat $3. num;
datalines;
1 cat 469.9
1 dog 287.1
2 cat 494.3
2 dog 261.6
;
run;

data test2;
set test1;
*** ADD A NEW VARIABLE (POPUP) WITH A TIP= TAG;
popup = 'tip=['||quote(cat) ||']';
run;
*** SELECT THE JAVAMETA DEVICE DRIVER, SET SIZE, FONT;
goptions reset=all
device=activex
xpixels=800
ypixels=600
ftext='HelveticaBold'
htext=3
gunit=pct;

ods listing close;
ods html file="h:\testpop.html";

proc gplot data=test2;
plot1 num*year /html=popup;
symbol1 v=dot c=blue;
run;
quit;
ods html close;
ods listing;
;
2 REPLIES 2
GraphGuy
Meteorite | Level 14

I think that the tip= is a javameta-only thing.

To make your code more portable & more likely to work with various different device='s, I would recommend using the standard html tags (either alt= or title=), such as ...

popup = 'title='||quote(cat);

I'm not 100% sure this will work in all devices (activex, java, javameta) - and it will also depend on which version you have.  I would recommend using "ods html" and device=png.

ccc143
Calcite | Level 5

That worked!!  Thanks!!!

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 2 replies
  • 1725 views
  • 1 like
  • 2 in conversation