apache / apache/echarts

[Bug] Tooltip lineHeight resets the layouts padding

Open
#20,790 4 comments 0 reactions 0 assignees View on GitHub
bug en pending
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://echarts.apache.org/examples/en/editor.html?c=line-simple&code=PYBwLglsB2AEC8sDeAoWsAeBBDEDOAXMmurGAJ4gCmRA5AMYCGYVA5sAE7m0A0J6AE2aMiAbVoBZGL1i0AKgFcqM2gHUqAlXIAWClQDEOEFQGVmphdFoBdEgF8-6cjnxFUpMpRqyAbowA2SrT2jrB4VEZUhLCi_MQegsJiAIwArAAMPLAATADMmTnZACxZ2ckAHFnJualVRQDspQBs6dahHhTUdP4Q0MpxdiRtJAD0I7AAohgs0AIasPQwAGYQrLBLHMAAtmTaVLBUGIxbIP5UJGDAwP6QIG5xYEasrBF0jLh4vA-HYCYUZ_cErAxrAen0ABJUVbaMBEZJZEEcKJUMB4Xb7ECMAQCXqsOLoEFgqiQ6Gw2DJAoggDunAA1oxNpYBLAABTJACU-PWMF-EAAXt5ktkEeMaRx6YzZqzspyPIN0IM7ABuIA

### Steps to Reproduce

1. Create a chart of any kind. (Tested: line and polar)
2. Add a tooltip.textStyle.lineHeight property. (Tested: 0.5 - 2)

### Current Behavior

Notice the tooltip layout default padding has been reset. (Updated the image)
Image

### Expected Behavior

Default padding should not have any impact on lineHeight set or change.
![Image](https://github.com/user-attachments/assets/4b91adfa-f08f-4981-ba12-18ea88df1eec)

### Environment

```markdown
- OS: macOS 15.3.1 (24D70)
- Browser: Google Chrome 133.0.6943.127 (Official Build) (arm64)
- Framework: N/A
```

### Any additional comments?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.