Skip to content

[Bug] markPoint.label.rich设置富文本的宽度后出现空指针异常 #21651

@Youngwings

Description

@Youngwings

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

- OS:window
- Browser: Chrome
- Framework:React

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpendingWe are not sure about whether this is a bug/new feature.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions