Hiding labels on y axis in Chart.js

后端 未结 9 1176
再見小時候
再見小時候 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 19:57

    To hide just the labels, in the latest version (2.3.0) of Charts.js, you disable ticks like so:

    options: {
        scales: {
            yAxes: [{
                ticks: {
                    display: false
                }
            }]
        }
    }
    

提交回复
热议问题