Sign in

Sign up

Disable Y axis on line chart

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


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


1 Answers
Bartłomiej Malanowski answered 5 months ago

Try this code:

options: {
scales: {
yAxes: [{
display: false

Bartłomiej Malanowski replied 5 months ago

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

gabri35 replied 5 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.