[Bug] markPoint.label.rich设置富文本的宽度后出现空指针异常
- Dominant language
- TypeScript
- Stars
- 67.3k
- Forks
- 19.8k
- Avg merge
- 11d 14h
- Merged PRs (30d)
- 8
Description
### Version
5.6.0
### Link to Minimal Reproduction
https://jsbin.com/?html
### Steps to Reproduce
markPoint:{
label: {
show: true,
padding,
borderRadius: 4,
backgroundColor: '#fff',
shadowBlur: 5,
overflow: 'breakAll',
shadowColor: 'rgba(0, 0, 0, 0.1)',
shadowOffsetX: 2,
formatter: param => {
const { labelData } = param.data;
const labelContent = labelData.reduce((prev, cur) => {
return `${prev}\n${cur}`;
});
return `{text|${labelContent}}`;
},
rich: {
text: {
color: isDark ? '#eeeeee' : '#333',
fontSize: 14,
lineHeight,
width: 10,
},
},
},
}
>
### Current Behavior
--采用之前的markpoint配置,当label中的富文本配置了宽度,且Label的文本里应用了该富文本,当Label的文本足够长需要换行的时候可以复现该问题
### Expected Behavior
期望设置了富文本宽度当文本过长后能正常换行无任何报错
### Environment
```markdown
- OS:window
- Browser: Chrome
- Framework:React
```
### Any additional comments?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.