省份名稱和柱狀圖對(duì)不起? 高度不夠被壓了

解決方法:
在圖表setOption后添加如下代碼:
this.autoHeight = that.userNextCityData.length * 20; // counst.length為柱狀圖的條數(shù),即數(shù)據(jù)長(zhǎng)度。20為我給每個(gè)柱狀圖的高度。
myChart.getDom().style.height = this.autoHeight + "px";
myChart.getDom().childNodes[0].style.height = this.autoHeight + "px";
myChart.getDom().childNodes[0].childNodes[0].setAttribute("height",this.autoHeight);
myChart.getDom().childNodes[0].childNodes[0].style.height = this.autoHeight + "px";
myChart.resize();?
getDom是echarts實(shí)例下的方法

加完之后的效果,左側(cè)白色為滾動(dòng)條
