I am under the impression that the only way to have clickable hyperlinks above my graphs is to use the ODS HTML option NOGTITLE. (Correct, or not?)
So, when I use NOGTITLE in the ODS HTML statement, the titles, which previously were nicely centered above the actual graph, are no longer centered above the graph. It's like the graph uses one axis for centering, and the titles use a different axis for centering. Is there some way I can produce this graph so that titles are centered above the graph?
SAS 9.3, Windows 7 Pro
Hi:
You didn't post any code, so it's hard to comment on why your link did not work. When I use LINK= on the TITLE statement, as shown in the following code, my link is clickable. I did have to click in Internet Explorer to enable blocked content first in order to make the hyperlink active, but other than that, it worked for me.
cynthia
ods html path='c:\temp' (url=none)
file='uselink.html' gtitle;
proc gchart data=sashelp.class;
title link='http://www.sas.com' 'Click to Go to SAS';
vbar age /discrete;
run;
quit;
ods html close;
The issue isn't getting the hyperlinks to work; they do work. The issue is getting the titles centered above the plot (or the plot centered below the titles), which was not an issue before I added the NOGTITLE option to the ODS HTML statement.
Nevertheless, I have figured out what I was doing wrong, so I consider the problem to be solved.
Hi:
Good, glad you got it working.
In your first sentence in the original post, you had this:
"I am under the impression that the only way to have clickable hyperlinks above my graphs is to use the ODS HTML option NOGTITLE. (Correct, or not?)"
My program was showing that you could have clickable hyperlinks without NOGTITLE. This means that if you use links in your TITLE and put the TITLE inside the GRAPH (using GTITLE); then 2 things happen: 1) the links are clickable (answers your first question) and 2) with GTITLE, the titles are centered above the image.
If the TITLE is placed outside the GRAPH image (using NOGTITLE), then the title is centered to the page, not to the image.
Links are clickable in either mode (GTITLE or NOGTITLE). Sorry I wasn't clear about which question I was answering.
cynthia
Okay, thanks for pointing that out, that is useful information!
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.
Ready to level-up your skills? Choose your own adventure.