ChartJS hide labels on small screen sizes
问题 I have a problem hiding xAxes and yAxes labels on small screen sizes (mobile phones). I know there is this option: options: { scales: { xAxes: [{ ticks:{ display: false } }]; } } But if i use it in the onResize function like this var ctx = document.getElementById("chart"); var myChart = new Chart(ctx, { //chart data and options, onResize: function(myChart, size) { if (size.height < 140) { options: { scales: { xAxes: [{ ticks:{ display: false } }]; } } } }); But it does not work on resize. Is