Skip to content
Advertisement

How to hide the tick marks of the axis in react-chartjs-2

I want to display the axisY without labels, but this is not work

  scales:{
    yAxes:[{
      scaleLabel:{
        display: false
      }
    }],
  },
}```

Advertisement

Answer

Check if the below code works?

scales:{
yAxes:[{
  scaleLabel:{
    display: false
  },
  ticks: {
    display:false // it should work
  }
 }],
},
Advertisement