Accepted answer

there is an easier workaround to do this. just add a null to the end of your data array, like so

var bardata = {
    labels: ["january", "february", "march", "april", "may", "june"],
    datasets: [
            fillcolor: "#48a497",
            strokecolor: "#48a4d1",
            data: [45, 47, 124, 56, 70, 60, null]


i have taken the greatest value from the data and divide it with the scalesteps and set in scalestepwidth so it becomes custom scale according to my highest value.

 var mybarchart = new chart(document.getelementbyid("id").getcontext("2d")).bar(barchart, {
    animation: false,
    scaleoverride: true,
    scalesteps: 10,
    scalestartvalue: 0,
    scalestepwidth: 20

now the sacle will be 0 to 200. which is ok for me.

Related Query

More Query from same tag