BookmarkSubscribeRSS Feed
sanjay1
Obsidian | Level 7

Hi SAS experts,

 

Am trying to control the hights of bar graph.How can I controll the hights of bar graph..Below is my code..please help

 

axis1 label=none major=none minor=none style=0
value=none;
axis2 label=none;
legend1 label=(position=top) position=(right middle)
across=1 shape=bar(.11in,.11in);


pattern1 v=solid color=CXB22222;
pattern2 v=solid color=CXFF00FF;
pattern3 v=solid color=CXB8860B;
/*pattern4 v=solid color=CX8B4513;*/
/*pattern5 v=solid color=CX556B2F;*/
/*pattern6 v=solid color=CX6495ED;*/
/*pattern7 v=solid color=CX4169E1;*/


ods pdf file="path&name..pdf";
proc gchart data=test&name.;
vbar3d YEAR / discrete
sumvar=sales
shape=cylinder
subgroup=type
cframe=grayaa
caxis=black
width=10
space=4
legend=legend1
maxis=axis2
raxis=axis1
des="total sales for &name.";
run;
quit;

ods pdf close;

2 REPLIES 2
Reeza
Super User

I'm confused. 

In your current code SUMVAR controls the height. If you want something else you'll have to clarify. 

 

ballardw
Super User

The apparent height is going to be controlled by combinations of the device display area and the axis settings. For example if you vertical axis is set to diplay y values from 0 to 100 your bar heights will be different than if the axis is showing 0 to 50 for the same device settings. If you do not specify the y axis options such as ORDER, to control tickmarks, then SAS will generate a default one that displays the values involved and will vary depending on the data. .

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1213 views
  • 0 likes
  • 3 in conversation