06-27-2012 03:51 PM
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
06-27-2012 11:55 PM
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.
ods html path='c:\temp' (url=none)
proc gchart data=sashelp.class;
title link='http://www.sas.com' 'Click to Go to SAS';
vbar age /discrete;
ods html close;
06-28-2012 07:51 AM
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.
06-28-2012 04:27 PM
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.