Google chart bug? Axis not starting at 0
To anyone who still searching the way to make the axes start 0, you can try this options.
vAxes: {
0: {baseline: 0},
},
Note that I used vAxes instead of vAxis. I'm not sure why, but that did the trick.
I get the answer here : https://groups.google.com/forum/#!topic/google-visualization-api/vRNJUk9aZUI
You need to pass another parameter as part of the options when drawing the chart.
vAxis: {minValue: 0}
That will force the vertical axis to start from 0, you can see other possible options here: https://google-developers.appspot.com/chart/interactive/docs/gallery/columnchart#Configuration_Options
If you haven't data at the graph vAxis: {minValue: 0}
will not help. So you can use configuration option viewWindow
:
var options = {
vAxis: {
viewWindow: {
min:0
}
}
};
var chart = new google.visualization.ComboChart(document.getElementById('chart_div'));
chart.draw(dataTable, options);