您可以检查一下chart.js示例。从那里,我发现您的示例的对象设置中存在一些偏差
var config = {
type: 'line',
data: {
datasets: [{
// Here starts your snippet
}]
},
options: {
// The options are outside of the datasets property
scales: {
x: {
gridLines: {
display: false
}
},
y: {
gridLines: {
display: false
}
}
}
}
};
编辑1:使用gridLines属性更新比例
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句