Skip to content
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

F2 如何自定义 Tooltip 的内容和样式 #1989

Open
Alexixyc opened this issue Aug 7, 2024 · 2 comments
Open

F2 如何自定义 Tooltip 的内容和样式 #1989

Alexixyc opened this issue Aug 7, 2024 · 2 comments

Comments

@Alexixyc
Copy link

Alexixyc commented Aug 7, 2024

  • F2 Version:
  • Platform:
  • Mini Showcase(like screenshots):
  • CodeSandbox Link:

我想自定义 f2 的 tooltip,翻了源码试了很久,发现这个 customText 是这样用的:

  1. custom 默认是 false
  2. customText 传进去 一个函数,return 图形标签

这个逻辑在文档,Props 注释中都没有提到,想问下这个用法我可以当做 feature 直接这样用吗?

1231
1231241

@zengyue
Copy link
Member

zengyue commented Aug 8, 2024

是 feature, https://github.com/antvis/F2/blob/master/packages/f2/test/components/tooltip/tooltip.test.tsx#L370 这里有单测保证的

@Alexixyc
Copy link
Author

Alexixyc commented Aug 8, 2024

是 feature, https://github.com/antvis/F2/blob/master/packages/f2/test/components/tooltip/tooltip.test.tsx#L370 这里有单测保证的

好滴,感谢解答

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants