BUG: Enabling chbh=a for bar charts unexpectedly changes Y scale, but not bar height.

15 views
Skip to first unread message

Dan

unread,
Mar 5, 2009, 11:28:15 AM3/5/09
to Google Chart API
There appears to be a bug (or an unintended side-effect, anyway) of
adding chbh=a to a bar chart.

Here's the original chart (taken from the API docs, with "chxr"
changed for the Y scale:

http://chart.apis.google.com/chart?chxt=x,y,r&chxr=0,100,500|1,0,227|2,1000,0&cht=bvs&chd=s:c9uDc&chco=76A4FB&chls=2.0&chs=200x125

Important to note, the Y axis has a scale of "0" to "227", and the
chco values are scaled appropriately to match this range.

If I add "chbh=a" to the chart:

http://chart.apis.google.com/chart?chxt=x,y,r&chxr=0,100,500|1,0,227|2,1000,0&cht=bvs&chd=s:c9uDc&chco=76A4FB&chls=2.0&chs=200x125&chbh=a

the Y Axis scale is changed from 0-227 to 0-200, but the vertical size
of the bars is not. The height of the bars no longer matches the Y
scale (in my real world case, bar heights are a % of 227, which works
great if the Y scale goes up to 227).

The same problem occurs if you use "chbh=r,<n>,<m>":

http://chart.apis.google.com/chart?chxt=x,y,r&chxr=0,100,500|1,0,227|2,1000,0&cht=bvs&chd=s:c9uDc&chco=76A4FB&chls=2.0&chs=200x125&chbh=r,1,2

Evan

unread,
Apr 10, 2009, 2:41:41 PM4/10/09
to Google Chart API
I'm experiencing the same issue and looking for a fix or workaround.
Reply all
Reply to author
Forward
0 new messages