开发者社区> 问答> 正文

ECharts 的柱状图显示比较小,怎么放大?周围空白的地方太多了? 400 报错

ECharts 的柱状图显示比较小,怎么放大?周围空白的地方太多了? 400 报错

周围空白的地方很多,能放大一点吗?

option = {
  color : ['#ffcc00','#0099cc'],
    tooltip : {
        trigger: 'axis'
    },
    calculable : true,
    animation:false,
    toolbox:{show:false},
    xAxis : [
        {
            type : 'category',
            boundaryGap : false,
          data : ['8:00','9:00','10:00','11:00','12:00','13:00','14:00','15:00','16:00','17:00','18:00','19:00']
        }
    ],
    yAxis : [
        {
            type : 'value',
            axisLabel : {
                formatter: '{value}'
            },
            splitArea : {show : false}
        }
    ],
    series : [
        {
            name:'管道',
            type:'line',
          symbol:'circle',
          symbolSize:'4',
          itemStyle: {
                normal: {
                    lineStyle: {
                      type : 'solid',
                      width:'3'
                    }
                }
            },
            data:[100, 100, 200, 100, 100,400, 100, 500, 100, 100,200,300]
        },
        {
            name:'瓶装',
            type:'line',
          symbol:'circle',
            symbolSize:'4',
            itemStyle: {
                normal: {
                    lineStyle: {
                      type : 'solid',
                      width:'3'
                    }
                }
            },
            data:[200, 100, 100, 100, 100,300, 100, 100, 200, 300,100,100]
        }
    ]
};


展开
收起
爱吃鱼的程序员 2020-06-01 10:53:42 1215 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    查文档,grid######

    加dataZoom ={ show : true };
    ######添加grid属性,其中X,Y作为起始点,相当于 lefttop,并设置width和height######

     grid: {
                    top: '4%',
                    left: '3%',
                    right: '4%',
                    bottom: '3%',
                    containLabel: true
                },

    2020-06-01 10:53:44
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载

相关实验场景

更多