BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
JasonL
Quartz | Level 8

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

1 ACCEPTED SOLUTION

Accepted Solutions
MikeZdeb
Rhodochrosite | Level 12

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)

View solution in original post

8 REPLIES 8
GraphGuy
Meteorite | Level 14

What did you use to create this particular bar chart?

DanH_sas
SAS Super FREQ

I think if you specify a wider bar width, that extra space will be used by the bar chart.

GraphGuy
Meteorite | Level 14

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 😕

JasonL
Quartz | Level 8

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".

MikeZdeb
Rhodochrosite | Level 12

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)

JasonL
Quartz | Level 8

Thanks a lot Mike!  I'll try that.

JasonL
Quartz | Level 8

Thank you very much Mike - it worked and it's simple!


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
  • 8 replies
  • 1427 views
  • 0 likes
  • 4 in conversation