lable 某个名称换行 \n /n /br axisLabel换行 文字换行 echarts

      axisLabel: {
        interval: 0,
        textStyle: {
          color: '#D9D9D9',
          fontSize: fontChart(0.2),
          lineHeight:12,
        },
        formatter: function (params) {
          // '交通运输、仓储和邮政业', '制造业', '科学研究和技术服务业'
          if (params === '交通运输、仓储和邮政业') { return '交通运输、\n仓储和邮政业' }

          else if (params === '科学研究和技术服务业') { return '科学研究\n和技术服务业' }

          else {
            return params
          }
        }
      },

猜你喜欢

转载自blog.csdn.net/weixin_50885665/article/details/132019257