echarts中图表过于靠左或靠右的情况解决办法。

经过好多次尝试,终于在http://blog.csdn.net/ainuser/article/details/76641963中得到解决。

grid: {
        x: '30%', //相当于距离左边效果:padding-left
        y: '30%',  //相当于距离上边效果:padding-top
        bottom: '3%',
        containLabel: true
    }

其中,X与Y在官方文档中已不可见,不知为什么,但仍旧可以用的。

原文地址:https://www.cnblogs.com/axu92312/p/7839877.html