BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
DavidPhillips2
Rhodochrosite | Level 12

I’m working with a number of small graphs.  Some types of SAS line graph reports allow the user to hover over data points on the image and see the exact value of a point on the graph.  I noticed that this feature goes away when I resize images.  I also noticed that when I use sgrender to display a line graph that the hover feature only displays ‘The SGRender Procedure’. Is there a way to enable the hover feature using sgrender, preferably after resizing?

1 ACCEPTED SOLUTION

Accepted Solutions
DanH_sas
SAS Super FREQ

If you use WIDTH and/or HEIGHT on the ODS GRAPHICS statement, the imagemap will be generated correctly. When you said "resizing", I thought you meant you were changing the image dimensions in an editor after the image was generated.

As for the TIP options, look in the GTL reference doc at the plot statements you are using. You will see options that start with TIP that will enable you to do the following:

1. Control the content of the tip (which variables are shown, in what order, even add a variable that is not used by the plot)

2. Control the tip labels

3. Set an alternate format for the values in the tip

View solution in original post

7 REPLIES 7
DanH_sas
SAS Super FREQ

Yes, there is. On the ODS GRAPHICS statement, specify the IMAGEMAP option:

ods graphics / imagemap;

Also, there are various TIP options per plot statement that enable you to control various aspects of the tip text.

Hope this helps!

Dan

DanH_sas
SAS Super FREQ

Regarding the resizing question, if you change the size of the image after it is generated, then the imagemap will not be correct. It is better to determine your size in advance if possible.

DavidPhillips2
Rhodochrosite | Level 12

What sizing options can I use that will allow the image to be sized before it is generated?  I am using ods graphics / height=6in width=3in border=off; to resize the image. 

Can you recommend an article for tip options?  My goal is to show the value of each data mark.

DanH_sas
SAS Super FREQ

If you use WIDTH and/or HEIGHT on the ODS GRAPHICS statement, the imagemap will be generated correctly. When you said "resizing", I thought you meant you were changing the image dimensions in an editor after the image was generated.

As for the TIP options, look in the GTL reference doc at the plot statements you are using. You will see options that start with TIP that will enable you to do the following:

1. Control the content of the tip (which variables are shown, in what order, even add a variable that is not used by the plot)

2. Control the tip labels

3. Set an alternate format for the values in the tip

DavidPhillips2
Rhodochrosite | Level 12

Creating tooltips for scatter plots with PROC SGPLOT - The DO Loop

The article below is a great example, I was able to find it by Googling keywords in your explanation.

DavidPhillips2
Rhodochrosite | Level 12

Is there a way to rename elements such as the x and the y in the series plot? So that it shows up right in the tooltip?  E.g.

seriesplot x=TWO_DIGIT_YEAR y=students_enrolled / group=Degree_Level  name='a' index=index display=all

DavidPhillips2
Rhodochrosite | Level 12

Below is how to rename a tooltip.

ROLENAME=(Year=ACADEMIC_PERIOD_DESC )

TIP=(Year Y) tiplabel=(Year='Academic Term' Y='Students Enrolled')

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

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
  • 7 replies
  • 1572 views
  • 6 likes
  • 2 in conversation