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