When using multiple series on a Google bar chart, all the bars are the same height! This is because the min and max are being set for each series, rather than the overall chart. This scales all the bars to look the same height even though they have different values.

Here is the chart generated by charts_graphs-6.x-2.6:

http://chart.apis.google.com/chart?cht=bvg&chd=t:2|4|1&chds=0,2,0,4,0,1&chxt=x,y&chdl=Impressions|Clicks|Sales&chxl=0:|04/16&chxr=1,0,4,1&chco=FF7E00,8DB600,0247FE&chtt=&chs=300x200&chbh=a

Here is the chart after applying my patch:

http://chart.apis.google.com/chart?cht=bvg&chd=t:2|4|1&chds=0,4&chxt=x,y&chdl=Impressions|Clicks|Sales&chxl=0:|04/16&chxr=1,0,4,1&chco=FF7E00,8DB600,0247FE&chtt=&chs=300x200&chbh=a

Notice how &chds= argument is set for the whole chart rather than each series.

As far as the patch goes, I'm a newbie with Google Charts. So, I don't know if my changes have negative impact on the other types of charts and I'm not knowledgeable enough to test them all. Please review!

Regards,
David.

CommentFileSizeAuthor
charts_graphs-google-bar.patch1.07 KBdsnopek

Comments

rsevero’s picture

Status: Needs review » Closed (duplicate)