views:

92

answers:

1

I've just started using google charts and want to use it in a small project I'm workin on but I've bumped into a problem. The thing is I want the charts rather big at a static size and look good but I'm generating the charts dynamically with php. Now the problem is that I can't get it to scale properly in width but height is perfectly fine.

Here's an example chart I've generated:

chart

Parameters:

cht=bvo&chs=400x400
chd=t:1,4,1
chxr=2,0,4,1
chds=0,4
chco=4d89f9
chxt=x,x,y,y
chxl=0:|3|7|26|1:|Correct+answers|3:|People

You see how the chart fills the 400px of height but not the width. I've searched and look through the api but I can't get it right.

+1  A: 

The default is not to scale the bar width to fit the width of the chart. Adding chbh=a will probably do what you want.

See the documentation for more information on controlling bar width and spacing.

Nicholas Riley
Thanks for the answer and thanks for the link, that worked as I wanted.
Hultner