0👍
✅
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>
Source:stackexchange.com