css - 图表 js 高度 100%
问题描述
我的图表高度有问题,我无法将高度设置为 100%,请在下面找到我的两个图表的图像
这是图表的选项
type: 'horizontalBar',
data: chartdata,
options:{
responsive: true,
maintainAspectRatio: true,
aspectRatio: 1,
animation: false,
scaleSteps: 10,
legend:{
display: false,
},
showAllTooltips: true,
tooltips:{
enabled: false,
},
layout:{
padding:{
right: 70,
}
},
scales: {
xAxes: [{
position: 'top',
gridLines: {
lineWidth: 1,
},
scaleLabel: {
display: true,
labelString: 'Nombre de mouvement par outil',
},
ticks: {
min: 0,
stepSize: 1,
},
}],
yAxes: [{
barPercentage:0.9,
categoryPercentage:1,
gridLines: {
lineWidth: 1,
},
scaleLabel: {
display: true,
labelString: 'Identifiants outils',
},
}],
},
我查看了所有我做不到的可能选项
解决方案
推荐阅读
- java - 抽象类构造函数参数与最终数据的抽象方法
- java - H2 数据库生成策略在 id 值之间留下空白
- bash - Crontab 不工作(已完成标准故障排除)
- android - 使用单个活动和导航组件替代片段中活动的 onSupportNavigateUp
- c++ - 无需复制的大型成员变量的获取器
- c - 重新分配后访问数组位置的分段错误
- javascript - 如何在蚂蚁表中格式化日期?
- postgresql - PostgreSQL MIN 和 MAX 函数不返回一个结果
- python - Python:指定与继承一起使用的类方法的返回类型
- arrays - 从数组中取消大小时,Rust 如何确定切片的长度?