sribasu
sribasu

Reputation: 660

Google Image chart not showing correct value for Y-axis in Bar chart

I am rending image chart on a server side code. I am using bar chart (bvg). I am not able to render the chart the way I want to. I am sure it's doable because I have done it using Google Chart JS. The chart's x axis is month and y axis is score. I want to display the labels Month and Score for each axis along with the bar labels. I also want to show the value markers on the Y-axis.

When I add X and Y axis labels with chxl the Axis Labels shows up along with Y-axis value markers; but strange the value markers denote wrong values. The values range between 0 and 100 no matter what values my bar represents and that too the height of the bar doesn't match with the Y-axis values (which ranges between 0 and 100). Please help.

I've written the URL like this:

https://chart.googleapis.com/chart?cht=bvg&chxt=x,x,y,y&chxl=1:|Months|3:|Score&chxp=1,50|3,50&chbh=30,20,20&chds=0,40&chs=400x400&chco=015CAE,015CAE,015CAE,015CAE,015CAE&chd=t:22,32,11,27,8&chl=Jan|Feb|Mar|Apr|May

And I am concerned about the values displayed in the following snapshot of the chart (see highlighted values in red, they do not match the actual bar values):

enter image description here

Upvotes: 0

Views: 234

Answers (1)

Puneet gupta
Puneet gupta

Reputation: 11

Don't Include chds parameter

Here is the modified link:

https://chart.googleapis.com/chart?cht=bvg&chxt=x,x,y,y&chxl=1:|Months|3:|Score&chxp=1,50|3,50&chbh=30,20,20&chs=400x400&chco=015CAE,015CAE,015CAE,015CAE,015CAE&chd=t:22,32,11,27,8&chl=Jan|Feb|Mar|Apr|May

Upvotes: 1

Related Questions