How to set the width of echarts's title?

if the title is too long, you want to set the width to wrap the line. How to use this width? it won"t work even if you add it. What"s the use of rich in textStyle? you can"t formatter in title

.
Mar.24,2021

title.text string
[default:'']
main title text, which supports using \ n line feeds.

or do you want dynamic title text adaptive line wrapping?


text:[
    '{a|a}'
].join(''),
textStyle:{
    fontSize:14,
    rich:{
        a: {
            backgroundColor:'-sharpf00',
            height:40,
            align:'center'
        }
    }
}

write this way before rich takes effect. It is a chicken thief; title is a string type by default, so passing an object directly will report an error, so using the method of transferring an object from array to object, forcibly stuffing an object to text; is similar to formatter; width I have measured, the percentage width is still not good, the fixed value can be

.
Menu