这是我的选项:
scales: {
yAxes: [{
ticks: {
beginAtZero: true,
maxTicksLimit: 5,
suggestedMax: maxValue
}
}],
xAxes : [{
categoryPercentage: 1.0,
display : false, // set this to false to hide the labels under the bars
gridLines: {
display: false
}
}]
},
最佳答案
您要删除的可能是图表的边框。在 Chart.js v2 中,我能够通过将网格线配置的 drawBorder
设置为 false
来删除第一个垂直边框:
options: {
scales: {
yAxes: [{
gridLines: {
drawBorder: false
}
}]
}
}
在 Chart.js 文档中,它在 https://www.chartjs.org/docs/latest/axes/styling.html#grid-line-configuration 中进行了解释.
关于javascript - Chart.js 删除第一条垂直线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39323455/