BookmarkSubscribeRSS Feed
csetzkorn
Lapis Lazuli | Level 10

I am using this code:

 

 

pattern1 color=green;
axis1 label=(a=0 f= "Arial/bold" "Bla" ) color=black minor =(n=2) value=(angle=0);
axis2 label=(f="Arial/bold" "Bla") color=black value=(angle=90);

proc gchart data=Bla(where=(Bla = "&Bla." and Bla='YES'));
	title1 f="Arial/bold" c=black &Title.;
	format Bla NLMNLGBP32.0;
	vbar3d TBla / sumvar=Bla
		width=15
		outside=sum
		descending
		raxis=axis1
		maxis=axis2 
		legend=
		;	
run;
quit;

Is there a way of applying an angle (e.g. 45 degrees) to the values of sumvar and even make these values bold? Thanks.

 

3 REPLIES 3
ballardw
Super User

When you start wanting to control appearance of sumvar text properties, font, size angles rotation or such then you move into ANNOTATE data sets.

 

Check to see if your online help has an example named "Labeling Subgroups in a vertical Bar Chart" to get started.

csetzkorn
Lapis Lazuli | Level 10
Thanks I came across this. Is this really the only way )-:
ballardw
Super User

@csetzkorn wrote:
Thanks I came across this. Is this really the only way )-:

Are you going to do this frequently with many different data sets? Also which version of SAS are you using as graphics options change with each release for the statistical graphics pro

 

If so then you may want to consider 1) changing from Gchart to Sgplot and 2) modifying an ODS style template to display data labels that way or Use Sgplot with a SUMMARIZED data set so you know the values and use Sgplot with a VBARPARM and a TEXT plot to overlay text at locations which allows rotation.

 

The annotate sets aren't that difficult to make as there are a number of macros, but any time you want to control more elements of output you have to do more work somewhere along the line.

 

 

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
  • 743 views
  • 0 likes
  • 2 in conversation