Skip to content

[Bug] Pie chart label background display is abnormal due to lineHeight #21710

Description

@cogic

Version

6.1.0

Link to Minimal Reproduction

https://echarts.apache.org/examples/zh/editor.html?c=pie-half-donut&code=bZBBq8IwDMfvforA49HLDhU33tjDg6jgXfQiO2RdnMXajq4qIn53u7FVD-sl6T-_JH9iaieNhjk8JwANWUlNBgefQ6e0zz1qyoDVkljUS4K0I-tBlvBfFkEX8qGqsCCVhX4vSE0bktXJZTBN-MABmBvZozJ3P76whOewAKBAca6suepyaZTxu9iPECIAryEp0eHguHMNN1RXb3jK4zQCjZfW_JbQihOsdeWtsE_3F_83SwK-kpaEG-eSlAdufUGpxrE4jQO20-2NF2Uzjs74Z-JelmR6tCfzLra_fPL6fwM&enc=deflate

Steps to Reproduce

如果饼图的标签同时设置 { backgroundColor: 'any color' } 和 { overflow: 'break' } ,当标签的行高 lineHeight 太大时,标签背景的宽度会异常。

If the label of a pie chart is set with both { backgroundColor: 'any color' } and { overflow: 'break' } , when the lineHeight of the label is too large, the width of the label background will be abnormal.

Image

Current Behavior

the width of the label background is too wide

Expected Behavior

the width of the label background needs to fit label

Environment

- OS: win10
- Browser: Edge 150.0.4078.99

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugenThis issue is in EnglishpendingWe are not sure about whether this is a bug/new feature.regressionSomething no longer works as expected since a certain version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions