BookmarkSubscribeRSS Feed
Eva
Quartz | Level 8 Eva
Quartz | Level 8
Dear all,

I have a proc gchart with a group variable. Unfortunately the values of the group variable are longer than 32 characters. Therefore SAS automatically truncates these values to the length of 32. This causes a big problem for me as (who would have guessed) character 1-32 are the same for all the values and character number 33 then makes the difference.
Now SAS truncates the values to a length of 32 and therefore all values are the same and are displayed in the same group 😞
So I'd like to say: no, don't truncate the values of my group variable. Does anybody know how to do this?
(Explicitly setting the length in a data step before doesn't help)

Best regards
Eva
8 REPLIES 8
GraphGuy
Meteorite | Level 14
Sounds like you're not using v9.2 sas yet?

This was one of the (many) great new features & enhancements in v9.2 -- supporting bar chart midpoints & group values > 32 characters 🙂
Eva
Quartz | Level 8 Eva
Quartz | Level 8
No we are using SAS9.1.3
Is there a way to do this in that version?
GraphGuy
Meteorite | Level 14
The only way I know of that you can do it in v9.1.3 would be to use shorter (fake) values for your groups, and then annotate the desired text over the fake values (making the fake values white-on-white so they're "invisible"). It would be a bit tricky...

I think it would probably be quicker/easier to upgrade, than to figure out how to use annotated text labels in this scenario! 🙂
Eva
Quartz | Level 8 Eva
Quartz | Level 8
I guess I just manipulate the data instead of using annotate and then wait for SAS9.2 in our company.
Bill
Quartz | Level 8
Eva;

I can think of two alternatives.
1. Rename the group variables so that they are less than 32 long.
2. Use code values for the group variables and then add a legend - direct labelling is preferred, but if you're stuck ... Just be sure to locate the legend so that it's as adjacent as possible and in the same order as the data display.
GraphGuy
Meteorite | Level 14
Bill - I don't think >32 character text values work in the legend per-say in v9.1.3 (not even in v9.2). This is a feature I got added in (upcoming) v9.3 though 🙂

So, I'm assuming that by "legend" you're referring to creating a "fake" legend, by clever use of title, footnote, or note statements (or annotated text) - yep, that would work! :-) Message was edited by: Robert Allison @ SAS
Bill
Quartz | Level 8
With 9.1.3, I'm driven to clever!
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Many examples on the SAS support http://support.sas.com/ website - suggested Google advanced search argument to consider using:

gchart example group subgroup site:sas.com

Scott Barry
SBBWorks, Inc.

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