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?
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
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
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.
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.
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
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.
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
Below is how to rename a tooltip.
ROLENAME=(Year=ACADEMIC_PERIOD_DESC )
TIP=(Year Y) tiplabel=(Year='Academic Term' Y='Students Enrolled')
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: