01-28-2015 04:57 PM
In below graph you can see number labels are so congested. Also if number of digits gets more than 4 then it doesn't display at all.
I was wondering if there is a way to fix this. Can we increase space between bars?
01-29-2015 10:59 AM
I'm creating Excel output by running following code in SAS 9.4:
options device=ACTXIMG nobyline;
goptions device=png rotate=landscape ;
ods graphics on;
options(sheet_interval='none' sheet_name='Graph Output' sheet_label=' ' suppress_bylines='yes'
orientation='landscape' embedded_titles='yes' center_horizontal='yes'
Axis1 STYLE=1 WIDTH=1 MINOR=(NUMBER=1) LABEL=(f="calibri/Bold" "Group Counts" ) value=(h=8pt) ;
Axis2 STYLE=1 WIDTH=1 LABEL=( f="calibri/Bold" "Enrollment Date CCYYMM" )value=(h=8pt);
TITLE underlin=2 "#byval(region)";
PROC GCHART DATA=REGIONGRPCNT ;
VBAR ccyy /width=5 SUMVAR=grpcnt CLIPREF FRAME DISCRETE TYPE=SUM space=3
ods excel close;
01-29-2015 01:32 PM
Sorry, I can't help much as I don't have 9.4 and our IT won't let us generate activex anything. If fitting on a printed page isn't quite an issue then increasing the setting of HSIZE in the goptions statement might help.
09-21-2015 11:09 AM
You would need to make the graph itself wider, in order for the bars to be wider.
I'm not sure about activex, but with device=png, you can use 'goptions xpixels=1000;'
Once the page is wider, the gchart bars typically auto-size to fill up a 'comfortable' amount of the space, but you can further refine/control the bar width using the width= option.
Here's a small example:
goptions device=png xpixels=1000;
proc gchart data=sashelp.electric;
vbar year / discrete type=sum sumvar=revenue outside=sum width=8;