效果:echarts图对应dom元素的高度由y轴类目数量动态决定
const timeChart = echarts.init(document.getElementById('time-chart'))
const autoHeight = groupLength * 35 + 100; // groupLength为y轴类目数量。
timeChart.getDom().style.height = autoHeight + "px";
timeChart.getDom().childNodes[0].style.height = autoHeight + "px";
timeChart.resize()
timeChart.setOption(option,true)