rich富文本模式写label

 富文本实现
          axisLabel: {
            formatter: function (value) {
              console.log(value);
              return '{a| },{b|' + value + '}';
            },
            margin: 0,
            rich: {
              a: {
                height: 74.6,
                width: 74.6,
                align: 'left',
                backgroundColor: {
                  image: firstCircle,
                },
              },
              b: {
                fontSize: 40,
                color: '#A6CBFF',
                height: 110,
                width: 370,
                align: 'center',
              },
            },
          },

 

 

align:属性在rich中与在label中是不一样的,只有在rich中align:center 才能达到你想要的举中效果

posted @ 2022-07-29 14:55  SimoonJia  阅读(119)  评论(0编辑  收藏  举报