How to remove the x-axis showing up for the bottom?

0πŸ‘

βœ…

I’m personally of the opinion charts should start at 0 wherever possible, so setting beginAtZero: false isn’t a viable solution. I simply set the axis option zeroLineColor to transparent:

options: {
    scales: {
        yAxes: [{
            gridLines: {
                zeroLineColor: 'rgba(0, 0, 0, 0)'
            }
        }]
    }
}

πŸ‘:0

I solved it! For anyone who has the same issue, this is caused by beginAtZero:true. Simply change it to false and it will disappear.

Leave a comment