css - 我如何在条形图中滚动?[图表]
问题描述
我正在使用 echart 创建 bar 我有这个问题:
我希望有固定的高度和宽度,仅在超过 5 行时才显示 5 行,它有垂直滚动 我试图在 html 中做到这一点,但数字/ xAxis 它消失了,只有当用户向下滚动时才会出现,所以我需要在echart中制作
option = {
barWidth: '30%',
barCategoryGap :'10%',
title: {
text: 'test',
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
grid: {
left: '7%',
right: '4%',
bottom: '40%',
containLabel: true
},
xAxis: {
type: 'value',
boundaryGap: [0, 0.01]
},
yAxis: {
type: 'category',
data: ['Web', 'Web', 'web', 'web', 'web','web', 'web', 'web']
},
series: [
{
name: 'test',
type: 'bar',
data: [ 100, 80,30,50, 70, 100, 80,30]
},
]
};
解决方案
推荐阅读
- python-3.x - 如何使用 Ctrl+B 在 Sublime Text 3 中输入 Windows 路径以运行 Python
- flutter - Flutter - 来自现有存储桶的 AWS Amplify 存储
- python - Keras 预处理层
- c# - 使用带有约束的泛型时无法隐式转换类型
- trace32 - 从自定义 Trace32 菜单跳转到子程序
- python - 将存储在字典中的数组附加到python中的单个字典中
- django - 扩展了 User 模型,但不太确定如何为 User 和 UserExtended 序列化字段
- flutter - Flutter - 图标列表需要很长时间才能在 android studio 中加载
- pnpm - 将 pnpm 与 github 包一起使用是否有问题?
- python - Python烧瓶服务器检索某些记录