Hiding labels on y axis in Chart.js

后端 未结 9 1178
再見小時候
再見小時候 2020-12-30 19:34

I need to hide labels in line chart drawn using library chart.js. I googled but no luck. Could that be hidden?

Thanks

9条回答
  •  独厮守ぢ
    2020-12-30 20:03

    options: {
        scales: {
            yAxes: [{
                gridLines: {
                  display: true,
                  color: 'rgba(219,219,219,0.3)',
                  zeroLineColor: 'rgba(219,219,219,0.3)',
                  drawBorder: false, // <---
                  lineWidth: 27,
                  zeroLineWidth: 1                 
                },
                ticks: {
                    beginAtZero: true,
                    display: true
                }
            }]
        }
    }
    

提交回复
热议问题