apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.61k stars 19.62k forks source link

[Bug] textStyle is invalid when formatter and richText renderMode are being used in the tooltip #20240

Open souravpany opened 3 months ago

souravpany commented 3 months ago

Version

5.5.0

Link to Minimal Reproduction

PYBwLglsB2AEC8sDeAoWsA2BTA5l6AJgFzJrqxigkBEARsGJQLbUA0Z6BAhmFyQNrVA8IaBEFWoBdMgF926SsAyQQJVOQoAnCDjzqA8tBrQYWNh1hcMAdy4BPAM4BlABbBLAYRhh8YEmHUBXLFlyEGA7CEgYEgAzf2gAY0joAApwAEpSNXR1LDB_dTh

Steps to Reproduce

use richText renderMode use formatter add textStyle

tooltip: { renderMode: "richText", formatter: Data: {c}, textStyle: { fontSize: 60, fontWeight: "500", fontFamily: "My-Custom-Font", }, },

Current Behavior

223350153-d20ebfc0-7823-42b8-b66b-89664ba09559

Expected Behavior

223353773-b1a05017-011e-49a0-a79f-e87ad9d3fdf3

Environment

- OS: macOS Ventura
- Browser: 
- Framework: React / React native

Any additional comments?

I have used the same chart option for tooltip in react native framework also, but the result is same as web (as mentioned above).

helgasoft commented 3 months ago

duplicate of #18339 ! Do you really need to use renderMode:'richText' ? formatter and textStyle work together fine without it.

souravpany commented 3 months ago

@helgasoft

1 - Yes i need to to use 'richText' for react native frame work, because html option is not working in mobile. If you any suggestion on this please do share, i will definitely give a try.

2 - 'formatter and textStyle work together fine without it' - Yes it is but as mentioned above fontSize, fontWeight and fontFamily are not implementing on the tool tip text while using formatter and textStyle together.

One more request if you have any suggestions regarding the above points, please do share it would be highly appreciated.