我是Chart.js的新手,我想在我的图表中隐藏y轴和x轴线和标签.我查看了文档,找不到一个好的选择.有没有其他人遇到过这个问题并有解决方案?
pot*_*ngs 13
使用showScale选项会更好
var ctx = document.getElementById("LineWithLine").getContext("2d");
new Chart(ctx).Line(data, {
showScale: false
});
Run Code Online (Sandbox Code Playgroud)
小提琴 - http://jsfiddle.net/wb3kcunt/
这也隐藏了网格线.如果只想隐藏轴和标签而不隐藏网格线,只需将scaleFontColor和scaleLineColor设置为透明色.
| 归档时间: |
|
| 查看次数: |
9986 次 |
| 最近记录: |