BookmarkSubscribeRSS Feed
Santoshrk
Obsidian | Level 7

Hi Team, 

I'm using the below code to get the label in 2 lines. But for some reason the the text is not splitting into next line. Any Help much appreciated. 
example: "Placebo" in first line and "n/N(Response rate)" in the second line
sidebar / align = top;
      layout lattice / rows = 2 columns = 2 columnweights = preferred;
              entry halign = left "Placebo(*ESC*)/n/N(Response rate)"/ textattrs = (weight = bold);
              entry halign = left "DRUG_A(*ESC*)/n/N(Response rate)"/ textattrs = (weight = bold);
      endlayout;
endsidebar;

6 REPLIES 6
Ksharp
Super User
Try these two way:

1)
entry halign = left "Placebo(*ESC*)/n/N(Response rate)"/ textattrs = (weight = bold);
-->
entry halign = left "Placebo(*ESC*)n n/N(Response rate)"/ textattrs = (weight = bold);
2)
-->
entry halign = left "Placebo '0D'x n/N(Response rate)"/ textattrs = (weight = bold);
Santoshrk
Obsidian | Level 7

Santoshrk_0-1667650176197.png

I tried both the ways but it is not working. Please let me know if I miss anything. screenshot fo the code attached

Santoshrk_1-1667650255341.png

 

 

JeffMeyers
Barite | Level 11
Can you post a picture of what it looks like vs what you want it to look like (modify with paint)? Can cut out the graph part and just show the label.
Santoshrk
Obsidian | Level 7

Santoshrk_0-1667655555228.png

I need the column headers look like in the screenshot above

Ksharp
Super User
Could try these options ?

yaxistable subgroup Count Percent ci / VALUEJUSTIFY=center LABELJUSTIFY=center ;
JeffMeyers
Barite | Level 11
One thing to know is that you can nest layout statements. So rather than trying to add a line break just add another layout lattice or add a layout gridded with the number of rows you need and split the text:
Entry 'subgroup'.. ;
Layout gridded / rows=2;
Entry 'column 2 row 1 text';
Entry 'column 2 row 2 text';
Endlayout;
Layout gridded / rows=2;
Entry 'column 3 row 1 text';
Entry 'column 3 row 2 text';
Endlayout;
Entry 'column 4 text';

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 6 replies
  • 1480 views
  • 1 like
  • 3 in conversation