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