Chartjs-Y scaling relative to the max value in my ChartJS chart

0👍

I figured it out by replacing “max” by “suggestedMax”. ChartJS understands it’s just a suggestion and deal with my problem.

yAxes: [{
    gridLines: {
        display: true
    },
    ticks: {
        beginAtZero: true,
        suggestedMax: dataExcp[4] * 1.1,
        callback: function (value) {
            return value.toLocaleString() + " €";
        },
        fontStyle: 'bold'
    }
}
]

Leave a comment