It doesn't work correctly when I set grid.containLabel:true and yAxis.axisLabel.overflow
- Dominant language
- TypeScript
- Stars
- 67.3k
- Forks
- 19.8k
- Avg merge
- 11d 14h
- Merged PRs (30d)
- 8
Description
### Version
5.2.1
### Steps to reproduce
set the following option to Echarts example page
```
option = {
grid: {
left: 0,
top: 0,
bottom: 0,
containLabel: true,
},
yAxis: {
axisLabel: {
align: 'right',
width: 300,
overflow: 'truncate',
ellipsis: '...',
},
type: 'category',
data: [
'这段话出了问题,我期待containLabel长度以 yAxis.axisLabel.width 为准而不是以实际文字宽度为准',
'Wed',
'Thu',
'Fri',
'Sat',
'Sun',
],
},
xAxis: {
type: 'value',
},
series: [
{
data: [120, 200, 150, 80, 70, 110, 130],
type: 'bar',
showBackground: true,
backgroundStyle: {
color: 'rgba(180, 180, 180, 0.2)',
},
},
],
};
```
### What is expected?
the width of containLabel's width is not the text's length is yAxis.axisLabel.width
### What is actually happening?
It seem that the calculating width of containLabel is the really text's width before overflow
Contributor guide
Assessment
This issue has not been assessed yet.