BookmarkSubscribeRSS Feed
DavidPhillips2
Rhodochrosite | Level 12

In SAS 9.2.  I have two gcharts side by side.  So long as I do not change the device output the title is shared between the two graphs.  I noticed that the title actually displays in the middle outside of the frame for the two graphs. Is there a way to have a title for both graphs?

goptions hsize=7in vsize=3in border;

  ods tagsets.htmlpanel event = panel(start);

  title1 "Enrollment Headcount Summary by Residency";

       axis1 label=none;

       axis2 label=none;

       axis3 label=none;

       legend1 label=none;

       proc gchart data=enrollment;

       vbar FOUR_DIGIT_YEAR /

       type=sum

       inside=subpct noframe

       sumvar=STUDENTS_ENROLLED

       subgroup=residency_desc

       discrete

       nostats

       gaxis=axis1 maxis=axis2 raxis=axis3

       legend = legend1;

  run; Quit;

  title1 "2014 Residency Comparison";

       axis1 label=none;

       axis2 label=none;

       axis3 label=none;

       legend1 label =none;

       proc gchart data=RES_PCENT;

       hbar stud_or_deg_level / discrete type=sum sumvar=category_pct inside=subpct nostats noframe

       subgroup=residency_desc

       gaxis=axis1 maxis=axis2 raxis=axis3

       legend = legend1

       html=htmlvar;

       run;

  ods tagsets.htmlpanel event = panel(finish);

3 REPLIES 3
Cynthia_sas
SAS Super FREQ

Hi: Where is the statement with the FILE= option? Usually if you want each graph to have a separate title, you use the embedded_titles="yes" suboption on the initial ODS invocation statement. You did not show that statement, so I am not clear on what suboptions you used. When I run this code, I see that each graph has its own title. I am using SAS 9.4, so if you have a specific 9.2 question, you might want to work with Tech Support.

Cynthia


ods tagsets.htmlpanel nogtitle style=sasweb
path='c:\temp\' (url=none)
body="Forecast_Comparison.html"
options( panelcolumns='2' doc='help'
panelborder='2'
panelrows='2'
embedded_titles='Yes'
bylabels='no');


   ODS tagsets.htmlpanel event=row_panel(start);

goptions device=actximg;

proc gchart data=sashelp.shoes;
where region in ('Asia', 'Canada', 'Pacific');
  title 'Casual Shoes';
  where also product contains 'Casual';
  vbar region / sumvar=sales type=mean name='csl';
run;
quit;
   

proc gchart data=sashelp.shoes;
where region in ('Asia', 'Canada', 'Pacific');
  title 'Dress Shoes';
  where also product contains 'Dress';
  vbar region / sumvar=sales type=mean name='drs';
run;
quit;

   ODS tagsets.htmlpanel event=row_panel(finish);
   ODS tagsets.htmlpanel event=row_panel(start);


proc gchart data=sashelp.shoes;
where region in ('Asia', 'Canada', 'Pacific');
  title 'Shoes for Women';
  where also product contains 'Women';
  vbar region / sumvar=sales type=mean name='fem';
run;
quit;

 

proc gchart data=sashelp.shoes;
where region in ('Asia', 'Canada', 'Pacific');
  title 'Shoes for Men';
  where also product contains 'Men';
  vbar region / sumvar=sales type=mean name='mal';
run;
quit;
run;

   ODS tagsets.htmlpanel event=row_panel(finish);

ods tagsets.htmlpanel close;

DavidPhillips2
Rhodochrosite | Level 12

Embedded_titles knocks my graphs to two separate lines in SAS 9.2. Even though I have

%LET _ODSDEST=Tagsets.HTMLPANEL;

%LET _ODSOPTIONS=gtitle gfootnote options(panelcolumns='4') style=normal;

Cynthia_sas
SAS Super FREQ

Hi:

  I see you're doing this in a stored process, in which case, the way the output is created would depend on your client application. I don't have 9.2 anymore and I don't have a BI image to test on either. So I think your best bet for help with this is to work with Tech Support.

cynthia

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
  • 3 replies
  • 1090 views
  • 3 likes
  • 2 in conversation