BookmarkSubscribeRSS Feed
PaigeMiller
Diamond | Level 26

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 ProExample Output.png

--
Paige Miller
4 REPLIES 4
Cynthia_sas
SAS Super FREQ

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;

PaigeMiller
Diamond | Level 26

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.

--
Paige Miller
Cynthia_sas
SAS Super FREQ

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

PaigeMiller
Diamond | Level 26

Okay, thanks for pointing that out, that is useful information!

--
Paige Miller

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 4 replies
  • 1423 views
  • 0 likes
  • 2 in conversation