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 · 4 comments
Open

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

Alexixyc opened this issue Aug 7, 2024 · 4 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 这里有单测保证的

好滴,感谢解答

@ammmmmms
Copy link

ammmmmms commented Jan 15, 2025

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

我在vue3+vite的项目中单独传入text组件不会有问题,但是用group组件包裹使用就不生效了,控制台报错[Vue warn]: resolveComponent can only be used in render() or setup().
请问要怎么写才能使用?

@ammmmmms
Copy link

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

我在vue3+vite的项目中单独传入text组件不会有问题,但是用group组件包裹使用就不生效了,控制台报错[Vue warn]: resolveComponent can only be used in render() or setup(). 请问要怎么写才能使用?

后续已解决,提出成单独的jsx文件就可以了

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

3 participants