antvis/G6

tooltip 展示问题 #4724

guohaiping521 posted onGitHub

问题描述

image image 鼠标滑动到节点1,展示是ok的,滑动到节点3,希望tooltip能展示到该节点的左边,但是却遮住了节点,这个有自适应的方法吗

重现链接

https://stackblitz.com/

重现步骤

鼠标滑动上去

预期行为

希望自适应

平台

Mac

屏幕截图或视频(可选)

No response

补充说明(可选)

No response


fixToNode 或者offsetX/Y

posted by auuunya almost 2 years ago

1.fixToNode不行,最后一个如果比较长,会像上面的图片显示的那样,节点右边的边为起始,遮盖住节点 2.offsetX 会造成tooltip展示不固定

posted by guohaiping521 almost 2 years ago

暂时没有支持这种自动适应,可以自定义 DOM 浮层作为 tooltip,挂载方式:https://g6.antv.antgroup.com/manual/advanced/coordinate-system

posted by Yanyan-Wang almost 2 years ago

canvas容器的父元素设置相对定位

posted by chw-2021 over 1 year ago

This issue has been closed because it has been outdate for a long time. Please open a new issue if you still need help.

这个 issue 已经被关闭,因为 它已经过期很久了。 如果你仍然需要帮助,请创建一个新的 issue。

posted by github-actions[bot] 10 months ago

Fund this Issue

$0.00
Funded

Pull requests