apache / apache/echarts

[Bug] Tooltip with renderMode: 'richText' does not apply rich styling to formatter.

Open
#19,966 10 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.5.0

### Link to Minimal Reproduction

https://echarts.apache.org/examples/zh/editor.html?c=bar-simple&code=PYBwLglsB2AEC8sDeAoWsAeBBDEDOAXMmurGAJ4gCmRA5AMYCGYVA5sAE7m0A0J6AE2aMiAbVoBZGL1i0AKgFcqM2gHUqAlXIAWClQDEOEFQGVmphdFoBdEgF8-6cjnxFUpMpRqyAbowA2SrT2jmTAwP6QIG78sBxU0AJUHFJJdEb02nJUGGC8sQBmnAC2zCwcRAAUIIwcjMV4AJTo8AB8xB7o8WAKHHCwAAawACRINXUNAHTQ9VR2bgBGgVQAPqPj9XiTfst2dgOxDrEA9McAQlT-wADusHgU_hDQrLD4sNDAYLCMICCPGrEMtoYp1YEslCDQbB6BFOHRwcpQqCitAwOoIKxtGB4RFNEjSHZDviWLkTA9vO5OkDIaCETSoTCrhVZAj8lDSCi0VQMVicf48bEPITQcKCSESHhkhAqIRYKJYpSPEIwCI5QBGABMAAYeLBtTrYGqAKwGgAcBoA7Aa1WrrQBmLXWfHoCjUeG1YJCki2OwAbiAA

### Steps to Reproduce

Specify renderMode: 'richText' in the tooltip and use richText formatting in the formatter.
Then specify the richText styling in tooltip.rich or in tooltip.textStyle.rich

### Current Behavior

Currently, rich is not supported by tooltip, and renderMode:'richText' seems to be a useless option. In wechat applets without DOM, there is no way to customize different styles.

### Expected Behavior

rich styling should be applied to the formatter.

### Environment

```markdown
- OS: Windows 10
- Browser: Chrome
```

### Any additional comments?

### What does the proposed API look like?
`tooltip.rich`
or
`tooltip.textStyle.rich`

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.