I was trying to expand the bar chart to the empty area in the right side of the graphics box in the attached. Is this a matter of increasing the size of the "Data Area"? If yes, how can that be done?
Also, how do I control the Procedure Output Area? And Graphics Output Area?
Thanks.
Jason
hi ... another way to change the width of the entire chart is to change the HPOS option
(the blue is a link ... might be worth a try)
What did you use to create this particular bar chart?
GChart.
I think if you specify a wider bar width, that extra space will be used by the bar chart.
Assuming you don't have any blank titles and/or footnotes on the right-hand side, reserving white-space there ...
Typically, to make the gchart wider so that it will fill more of the available space, you can make the bars wider and/or the space between the bars bigger (using the gchart vbar 'width=' to control the bar width, and the 'space=' option to control the amount of space).
A word of caution though - If you make them "too big" you could run out of space, and then gchart typically reverts back to various default settings. Also, if your data changes, and you have more bars, they might not fit if you're hard-coding the width= and space=. I'm not 100% sure, but I think that the font also affects the bar width in some cases (therefore if you get it 'just right' and then change the font, your bar widths might be different). It's a bit of "black magic" to get it just right, like you're wanting, I suppose 😕
Thank you both, Dan and Robert.
It's a bit tricky in my case because I need to create a huge number of charts with different numbers of bars. I need to change the bar width and space dynamically and am hoping to maximize and pre-determine the size of the "Data Area".
hi ... another way to change the width of the entire chart is to change the HPOS option
(the blue is a link ... might be worth a try)
Thanks a lot Mike! I'll try that.
Thank you very much Mike - it worked and it's simple!
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.