This is my chart code my x axis value correct but y axis value is not working
<script>
const config = {
type: 'line',
data: {
datasets: [{
data: <%=lineData%>
}]
},
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero: true,
stepSize: 2
}
}]
}
}
};
</script>
<script>
const myChart = new Chart(
document.getElementById('myChart'),
config
);
</script>
debugged value is correct but they does not on my chart
CodePudding user response:
The problem is ',' on the y-axis value, change it to '.'
data: [{x: 17.05.2022 19:44:47, y: 28.28}]