Dmi*_*eev 3 javascript charts reactjs chart.js react-chartjs
这是我的选项的样子:
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
}
}]
},
Run Code Online (Sandbox Code Playgroud)
Fri*_*uxe 12
您要删除的可能是图表的边框。在 Chart.js v2 中,我能够通过为网格线配置设置drawBorder为来删除第一个垂直边框false:
options: {
scales: {
yAxes: [{
gridLines: {
drawBorder: false
}
}]
}
}
Run Code Online (Sandbox Code Playgroud)
在 Chart.js 文档中,它在https://www.chartjs.org/docs/latest/axes/styling.html#grid-line-configuration 中进行了解释。