这是我的图表代码,我的X轴值正确,但Y轴值不工作
<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>
and this is my chart,
debugged value is correct but they does not on my chart
1条答案
按热度按时间o0lyfsai1#
问题是y轴值上的“,”,请将其更改为“.”