Open GidianB opened 6 months ago
Agree, renderMode 'richText' is misleading since there is no rich in tooltip API. Technically we cannot call it a bug since rich is missing, but I think rich was meant to be used, just some source code was not hooked up...? Proof: tooltip recognizes 'rred' as rich format and does not display it as string, but does not apply it as format either.
formatter: '{b}: {rred|{c} }',
renderMode: 'richText',
rich: {
primary: { color: 'magenta' },
rred: { color: 'red', fontWeight: 'bold' }
},
So this issue could be updated to a valid and very useful New Feature Request. EDIT: found a duplicate #12232 and a pending PR https://github.com/apache/echarts/pull/14994. EDIT2: as of Aug 2024 the above proof code does not work anymore
EDIT final: renderMode:'richText' has nothing to do with rich formatting, but with DOM and apps like WeChat. So I virtually retract all my "findings" (nonsense) above 😓
@helgasoft Thanks for the information! I will review the PR tomorrow.
@Ovilia any update on this?
any update on this?
any update on this?
any update on this?
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
Any additional comments?
What does the proposed API look like?
tooltip.rich
ortooltip.textStyle.rich