我正在有序地使用Echarts创建一些图表。我的问题是,当我从toolbox中更改这类图表时,新图表超过了绘图区域。我只对bar有这个问题。

每秒钟都有一个轮询器刷新图表。
toolbox:
{
show: true,
feature:
{
magicType:
{
show: true,
title:
{
line: "Line",
bar: "Bar",
tiled: "Tiled"
},
type: ["line", "bar", "tiled"]
},
restore:
{
show: true
},
saveAsImage:
{
show: true
}
}
},发布于 2017-07-11 09:13:09
这是因为条子放在x轴上,而不是在它们之间。
这可能是由boundaryGap: false引起的。
尝试将x轴设置为:
xAxis: {
boundaryGap : true,
}如果不希望标签位于x轴之间,请使用:
xAxis: {
boundaryGap : true,
xAxisTicks : {
alignWithLabel : true
}
}https://stackoverflow.com/questions/44117179
复制相似问题