Data visualization with SAS programming

Gchart Bar Width

Posts: 0

Gchart Bar Width

I would like to increase the width of the bars.
bu1 has two categories and question has 4 categories (8 bars).
I've tried changing the width and space, but I keep getting this warning:
WARNING: There was not enough room to use the specified width of 10 for the bars.

Does anyone know how to get around this problem and increase the width of the bars?

proc gchart data=bar1 anno=my_anno1;
hbar bu1 / discrete
type=sum sumvar=catpct
autoref clipref cref=graycc
SAS Employee
Posts: 963

Re: Gchart Bar Width

This one's hard to answer exactly, without having the data to experiment with, but here are a couple of ideas ...

Perhaps you could make the entire chart taller (such as using "goptions ypixels=1000"), which would give more room for wider bars.

Perhaps try changing the device (there might be slight differences in bar spacing between dev=gif and dev=png, and there will certainly be differences with dev=actximg and dev=javaimg).

And if the values along the bottom/response axis of your hbar chart have a format applied, and if that format 'pads' on a lot of extra space on the left (such as if you're using the "comma20." format, when your numbers only need 4 or 5 digits), then you might try using a smaller format to free up some space to be used by wider bars in the bar chart.

These are just some ideas - not really sure if any of them will be your "silver bullet" though! Smiley Happy Message was edited by: Robert Allison @ SAS
Post a Question
Discussion Stats
  • 1 reply
  • 2 in conversation