目前,条形图存在问题。我无法将0设置为一个值。是否可以将chartjs
中的值与正值一起设置为0?
var myChart = new Chart(ctx, {
type: 'bar',
data: {
labels: chart_labels,
datasets: [{
label: chart_name,
data: chart_data,
backgroundColor: chart_backgroundColor,
borderColor: chart_borderColor,
borderWidth: 1
}]
},
options: {
barValueSpacing: 1,
scales: {
xAxes: [{
ticks: {
maxRotation: 90,
minRotation: 90
},
gridLines :{
display:false
}
}],
yAxes: [{
ticks: {
suggestedMin:min_value,
beginAtZero:false
}
}]
}
}
});