echarts xAxis字显示不全

缺少中间两个

 xAxis: [
          {
    
    
            type: "category",
            data: [
              "x1x1x1x1x1x1",
              "x2x2x2x2x2x2",
              "x3x3x3x3x3x3",
              "x4x4x4x4x4x4",
              "x5x5x5x5x5x5",
            ],
            nameTextStyle: {
    
    
              color: "#386BFF",
            },
            axisLine: {
    
    
              lineStyle: {
    
    
                color: "rgba(57,108,255, 0.2)",
              },
            },
            axisLabel: {
    
    
              color: "#386BFF",
            },
          },
        ],

在这里插入图片描述

解决:

 xAxis: [
          {
    
    
            type: "category",
            data: [
              "x1x1x1x1x1x1",
              "x2x2x2x2x2x2",
              "x3x3x3x3x3x3",
              "x4x4x4x4x4x4",
              "x5x5x5x5x5x5",
            ],
            nameTextStyle: {
    
    
              color: "#386BFF",
            },
            axisLine: {
    
    
              lineStyle: {
    
    
                color: "rgba(57,108,255, 0.2)",
              },
            },
            axisLabel: {
    
    
               interval: 0, //去除间隙  刻度间隔为0
              color: "#386BFF",
            },
          },
        ],

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_43291759/article/details/110555424
今日推荐