echarts - Apache ECharts:旋转标签被裁剪
问题描述
我正在尝试在我的图表中使用旋转标签。但是,标签正在被裁剪。如何在底部腾出更多空间以便标签适合?
options = {
xAxis: {
type: "category",
data: axis,
axisLabel: {
show: true,
interval: 0,
rotate: 45,
},
axisTick: {
show: true,
interval: 0
}
},
yAxis: {
type: "value",
data: axis,
min: 1,
minInterval: 1,
maxInterval: 1,
max: 15,
axisTick: {
interval: 1
}
},
series: [
{
type: "bar",
stack: "minmax",
itemStyle: {
normal: {
color: "rgba(0,0,0,0)"
}
},
data: maxs
},
{
type: "bar",
stack: "minmax",
data: mins,
itemStyle: { color: "#63869e" }
},
{
symbolSize: 20,
data: scatter,
type: "scatter",
itemStyle: { color: "black" },
},
]
};
解决方案
可以使用网格选项底部添加空间:
options = {
grid: {
bottom: 100,
}
}
推荐阅读
- pytorch - 在 PyTorch 中,逐行与矩阵中每隔一行的元素批量矩阵乘法
- python - 如何使用 youtube-dl 在不下载的情况下获取有关视频的信息
- r - 在 r 中添加斜坡函数
- machine-learning - Word2Vec - 具有高交叉验证分数的模型对测试数据表现得非常糟糕
- c - 绕过/切换/选择弱符号
- php - 如何在 Laravel 中创建 3 级深度类别的 URL
- c++ - 在命名空间内定义函数还是限定函数?
- python - 由于 WDDM 模式,不允许将我的 GTX1050 用于 tensorflow/keras
- c++ - 子类在继承期间显示未知行为
- c++ - 在 C++ 中将大型无符号浮点数舍入为整数的最佳方法是什么?