Home > front end >  [echarts] if the title of the pie chart very very long how is set to a certain width automatically t
[echarts] if the title of the pie chart very very long how is set to a certain width automatically t

Time:09-23

If special long will go beyond the title. Can you set the automatic turned!
Option={
Title: {
Text: 'a certain site users access to source site users access to source a certain site users access to source site users access to source a certain site users access to source site users to access source',
Subtext: 'fabrication',
X: 'center'
},
Tooltip: {
The trigger: 'item',
The formatter: "{a} & lt; br/> {b}, {c} ({d} %)
"},
Legend: {
Received: 'vertical',
Left: 'left',
Data: [' direct access to the ', 'email marketing', 'advertising', 'video advertising', 'search engines']
},
Series: [
{
Name: 'access to source,
Type: 'pie',
The radius: '55%',
Center: [' 50% ', '60%'],
Data: [
{value: 335, name: 'direct access to the'},
{value: 310, name: "email marketing"},
{value: 234, name: 'advertising'},
{value: 135, name: 'video ads'},
{value: 1548, name: 'search engines'}
],
ItemStyle: {
Emphasis: {
ShadowBlur: 10,
ShadowOffsetX: 0,
ShadowColor: 'rgba (0, 0, 0, 0.5)'
}
}
}
]
};


Please, answer

CodePudding user response:

Where to break the \ n

CodePudding user response:

With the upstairs
Haven't seen automatic folding line echarts

CodePudding user response:

reference 1st floor qq_33671300 response:
where to wrap with \ n
name is dynamic change

CodePudding user response:

Dynamic title background and let he can add a line break
  • Related