score:0

the x and y should not be arrays but objects, also the scalelabel prop is called title now. for all the changes please read the migration guide (https://www.chartjs.org/docs/master/getting-started/v3-migration.html)

example:

var options = {
  type: 'line',
  data: {
    labels: ["red", "blue", "yellow", "green", "purple", "orange"],
    datasets: [{
      label: '# of votes',
      data: [12, 19, 3, 5, 2, 3],
      bordercolor: 'pink'
    }]
  },
  options: {
    scales: {
      y: {
        beginatzero: true,
        title: {
          display: true,
          text: 'yaxis'
        }
      },
      x: {
        title: {
          display: true,
          text: 'xaxis'
        }
      }
    }
  }
}

var ctx = document.getelementbyid('chartjscontainer').getcontext('2d');
new chart(ctx, options);
<body>
  <canvas id="chartjscontainer" width="600" height="400"></canvas>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/chart.js/3.4.1/chart.js"></script>
</body>


Related Query

More Query from same tag