Hiding labels on y axis in Chart.js

后端 未结 9 1177
再見小時候
再見小時候 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:49

    Solved it with overriding y-axis labels width

    Chart.Scale.prototype.buildYLabels = function () {
      this.yLabelWidth = 0;
    };
    

提交回复
热议问题