Chartjs-Any way to make the y-axis border longer in chart.js?

0👍

While looking how to add padding between the tick marks and x-axis, I found a solution which allows me to do just that plus the above.

Which is by setting the y offset to true and hiding the x border:

Copied from here:

x: {
    grid: {
        drawBorder: false, // hide the x axis
    },
},
y: {
    offset: true, // create a sensation of space with the x axis hidden
},

In my case, it’s enough.

Leave a comment