javascript - 如何解决 ChartJS 甜甜圈选项中的语法错误?
问题描述
我正在尝试(努力)根据需要自定义 ChartJS donought。每当我插入cutoutPercentage: 70
选项时,我都会收到来自 JSlint 的语法错误。
无论我在哪个位置插入选项,它都不起作用。如果我只插入cutoutPercentage: 70
没有legend and tooltip options
它就可以了……但不能组合使用。
在职的:
options:{
legend: {
display: false
},
tooltips: {
enabled: true
}
}
工作以及:
options: {
cutoutPercentage: 70
}
不工作:
options:{
legend: {
display: false
},
tooltips: {
enabled: true
}
cutoutPercentage: 70
}
解决方案
推荐阅读
- ios - AVAssetExportSession 无法在 iOS13 设备上同时编译 .mp4 视频和 .aac 音频
- jenkins - 无法从 Bitbucket 触发管道 Jenkins 构建
- linux - 每次监视执行时都有不同的文件间接寻址
- json - 如何用 jq 命令替换 JSON 值?
- angular - 在反应式表单上使用正则表达式进行 Angular 7 电子邮件验证
- python-3.x - 从其他功能更改条目小部件值
- amazon-ec2 - Rancher 卡在等待 SSH 可用
- windows - Azure 上的 git 不要求我输入密码,推送失败
- javascript - 在 Mozilla Firefox 中使用 toLocaleDateString 函数无法获取正确的日期时间格式
- django - 您正在尝试添加没有默认值的不可空字段库存