Data visualization with SAS programming

Two gcharts side by side with tagsets.htmlpanel share one boarder.

Reply
Super Contributor
Posts: 465

Two gcharts side by side with tagsets.htmlpanel share one boarder.

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);

SAS Super FREQ
Posts: 8,721

Re: Two gcharts side by side with tagsets.htmlpanel share one boarder.

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;

Super Contributor
Posts: 465

Re: Two gcharts side by side with tagsets.htmlpanel share one boarder.

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;

SAS Super FREQ
Posts: 8,721

Re: Two gcharts side by side with tagsets.htmlpanel share one boarder.

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

Ask a Question
Discussion stats
  • 3 replies
  • 447 views
  • 3 likes
  • 2 in conversation