echarts 自定义y轴高度

<div class="eqBox">
<div id="main"></div>
</div>
let echarts = require('echarts');
let myChart = echarts.init(document.getElementById('main'));
if (this.mapDatas.length > 6) {
let autoHeight = this.mapDatas.length * 90;
myChart.resize({ height: autoHeight }) // 自定义高度
} else {
myChart.resize({ height: 600 })
}
本文介绍了如何使用ECharts根据地图数据动态调整Y轴高度,当数据超过6条时,自动设置高度为每条90像素,否则保持600像素。
1483

被折叠的 条评论
为什么被折叠?



