score:0

Accepted answer

this is because you are using v2 syntax by trying to configure the title in the scalelabel option. in v3 these options have been moved to the title namespace in the scale:

new chart('websitecalls_chartel', {
  type: 'line',
  data: {
    labels: ["sa", "so", "mo", "di", "mi", "do", "fr"],
    datasets: [{
      data: [0, 0, 0, 0, 0, 0, 0],
    }]
  },
  options: {
    scales: {
      x: {
        title: {
          display: true,
          text: 'x title',
          font: {
            weight: 'bold'
          },
        }
      },
      y: {
        title: {
          display: true,
          font: {
            weight: 'bold'
          },
          text: 'y title'
        }
      },
    }
  },
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/chart.js/3.7.1/chart.js"></script>
<canvas id="websitecalls_chartel" height="80"></canvas>


Related Query