echarts细节问题

1、grid:调整视图在容器中位置,类似于调整上下左右padding ;

grid: {
          top: '15%',
          bottom: '20%',
          right: '5%',
          left: '5%'
        },

 2、当X轴文本过长,文本斜着显示,倾斜

xAxis: {
          type: "category",
          axisLabel: {
            rotate: 15
          },
          data: []
        },

 3、为图表添加标题:

title: {
          text: "双随机任务数量",
          left: "5%",
          top: "5%",
          textStyle: {
            fontSize: "14",
            color: "#000",
            fontStyle: "normal"
          }
        },

 4、解决X轴 data里城市数据太多 超出隐藏问题

xAxis: {
          type: "category",
          data: ["郑州", "开封", "洛阳", "安阳", "焦作", "新乡", "许昌","济源","郑州", "开封", "洛阳", "安阳", "焦作", "新乡", "许昌","济源","焦作", "新乡",],
          axisLabel: {  //解决data里城市数据太多 超出隐藏问题
            interval: 0
            },
        },
原文地址:https://www.cnblogs.com/jervy/p/13665776.html