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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 1362 views
  • 0 likes
  • 4 in conversation