-
Notifications
You must be signed in to change notification settings - Fork 19.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(type): make the last two parameters ellipsis & options of the function truncateText optional #19447
Comments
@banyueyang It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗 TRANSLATEDTITLE [Bug] The echarts.format.truncateText method in legend's formatter function reported an error in ts: There should be 5 parameters, but 4 were obtained. How to solve it BODY Version5.4.2 Link to Minimal Reproductionts compatibility issues Steps to Reproduceconst optionPie: EChartsOption = { Current BehaviorI want to use echart's legend's formtter function in the react + ts project to make the ellipsis and hover of the legend, but an error is reported in ts. 5 parameters need to be passed. There are only 4 parameters in the official example. What is the fifth parameter to pass? Expected BehaviorI hope to be able to provide the correct usage method in ts, Environment- OS: macOS Big Sur
- Browser:Chome 120.0.6099.109
- Framework: React@18 + Typescript@4.9.5 Any additional comments?No response |
duplicate of #7479 |
|
… function `truncateText` optional. resolves apache/echarts#19447
Version
5.4.2
Link to Minimal Reproduction
ts兼容问题
Steps to Reproduce
Current Behavior
我想在react + ts项目中使用echart的legend的formtter函数来做图例的省略号并且hover,但是ts中报错,需要传5个参数,官方例子中只有4个参数,第五个传什么呢
代码
echarts.format.truncateText(name, 100, '14px Microsoft Yarer', '...');
Expected Behavior
希望能够提供正确的ts中使用方法,
Environment
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: