Sign in


Sign up


Disable Y axis on line chart

MDB SupportCategory: General Bootstrap questionsDisable Y axis on line chart
gabri35 asked 2 months ago, version:4.41

Hi

How can I disable the y axis on a line Chart?

regards

1 Answers
Bartłomiej Malanowski answered 2 months ago

Try this code:

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

Bartłomiej Malanowski replied 2 months ago

Currently, you cannot disable specific axes. It’s because of Chart.js doesn’t allow this

gabri35 replied 2 months ago

Thank you it worked.

But is it also posible to disable a specific y axis?
For example, I only want to show the yaxis with the labels.