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.
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 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.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Lock in the best rate now before the price increases on April 1.
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.
Ready to level-up your skills? Choose your own adventure.