Chartjs-Show xAxes on click

2👍

You need to modify the code a bit:

myChart.options.scales.xAxes[0].display = true;

That’s because the properties of xAxes are store in one-element array that is an object. You can check it with console.log.

also you can see here: Chart.js documentation

Leave a comment