我想将Yaxis从实数更改为整数,这里是图像,请帮我解决这个问题
这是我的代码
var lineChartData = {
labels: time,
datasets: [{
label: "S? ng??i ??ng kí ?ng h?",
borderColor: window.chartColors.red,
pointBackgroundColor: window.chartColors.red,
fill: false,
data: people_isProcessing
}, {
label: "S? ng??i ?ã ?ng h?",
borderColor: window.chartColors.purple,
pointBackgroundColor: window.chartColors.purple,
fill: false,
data: people_isReceived
}]
};
Run Code Online (Sandbox Code Playgroud)
这是我的图表选项
window.onload = function() {
var chartEl = document.getElementById("chart");
window.myLine = new Chart(chartEl, {
type: 'line',
data: lineChartData,
options: {
title: {
display: true,
text: 'Kindmate - Chart Static Donate'
},
tooltips: {
enabled: true,
mode: 'index', …Run Code Online (Sandbox Code Playgroud)