echarts increases the data rotation of the x-axis and y-axis

Sometimes the data name is too long to be displayed. What should I do? ? ? ?

Just upload the code directly.

option = {
  xAxis: {
    type: 'category',
    data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
    axisLabel: {
      interval: 0,  //数据之间的间隔
      rotate: 30   //旋转角度
    },
  },
 
  yAxis: {
    type: 'value'
  },
  series: [
    {
      data: [150, 230, 224, 218, 135, 147, 260],
      type: 'line'
    }
  ]
};

 

Put x to modify the x-axis, otherwise it will modify the y-axis

axisLabel: {
interval: 0,
rotate: 10
},

Under the renderings

 

Guess you like

Origin blog.csdn.net/finallyideas/article/details/132141345
Recommended