i'd chart bars extending 0 positive numbers grow upwards (as normal) negative numbers grow downwards zero. instead numbers starting negative baseline.
the other answers didn't work me. however, did manage find config option did work me.
var options = { // of other bar chart option here scales: { yaxes: [{ ticks: { beginatzero:true } }] } } var ctx = document.getelementbyid("mychart").getcontext("2d"); var mybarchart = new chart(ctx).bar(data, options);
passing chart options give me bar chart scale starting @ 0.
Comments
Post a Comment