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

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 867 views
  • 1 like
  • 3 in conversation