求解决方法,当前堆叠图设置最小高度barMinHeight时,出现重叠现象
解决方案:更新到echarts-5.2.2,是当时版本的bug
option = {
tooltip: {
trigger: 'axis',
axisPointer: {
// Use axis to trigger tooltip
type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow'
}
},
legend: {},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'value',
},
yAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
series: [
{
name: 'Direct',
type: 'bar',
barMinHeight:50,
stack: 'total',
emphasis: {
focus: 'series'
},
data: [320, 302, 301, null, 390, 330, 320]
},
{
name: 'Search Engine',
type: 'bar',
stack: 'total',
barMinHeight:50,
emphasis: {
focus: 'series'
},
data: [820, 832, 901, 934, 1290, 1330, 13200]
}
]
};