chart.js version 4.4 shows additional scales on both axes, how to remove these?

102 views Asked by At

In the Image as you can see on the left side of the y axis there is another scale which goes from 0 to 1 I want to remove this scale.

I thought adding a title to the graph will make it go away but that does not work, as you can see in the image it still adds a scale from 0 to 1 on the left side of the title that says "No. of students". Kindly help me fix this problem. If you have a reference to a documents which addresses this problem please share it in the comments.

options: {
    plugins: {
      legend: {
        position: 'top',
        display: true,
      },
      title: {
        display: false
      },
      
    },
    responsive: true,
    scales: {
      xAxes:
      {
        title: {
          display: true,
          text: 'Year',
        },
        position: 'bottom',
        grid: {
          color: "rgba(0, 0, 0, 0)",
          display: false,
          drawTicks: false
        },
        
      },
      yAxes:
      {
        title: {
          display: true,
          text: 'No. of Students',
        },
        beginAtZero: true,
        ticks: {
          stepSize: 5,
        },
        grid:{
          drawOnChartArea: false
        }
      }
    }
  }

This is the configuration options I've added I tried playing around them but could not get the scale off.

0

There are 0 answers