How to remove the line/rule of an axis in Chart.js?

前端 未结 5 1347
春和景丽
春和景丽 2021-01-17 20:17

I managed to remove all horizontale lines/rules in my chart using this:

scales: {
       xAxes: [{
        gridLines: {
            display: false
        }          


        
5条回答
  •  有刺的猬
    2021-01-17 20:54

    I found a way to remove this line. It's actually called the border of the axis and there's an option for it, see "Grid Line Configuration":

    scales: {
        yAxes: [{
            gridLines: {
                drawBorder: false,
            }
        }]
    }
    

提交回复
热议问题