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

分组柱状图划过图例图形消失 #2554

Closed
15531400827 opened this issue Jun 9, 2020 · 11 comments
Closed

分组柱状图划过图例图形消失 #2554

15531400827 opened this issue Jun 9, 2020 · 11 comments
Labels

Comments

@15531400827
Copy link

示例中利润应该是总金额的一部分, 所以不能使用堆叠柱状图,使用分组柱状图去掉
.adjust([
{
type: 'dodge',
marginRatio: 0,
},
]);
实现想要的结果, 但是滑过利润图例会发现图形消失, 应该是划过图例后图形zIndex设置的问题,
v3中同样实现方法是没有问题的

@YYL1999
Copy link

YYL1999 commented Jun 9, 2020

我看到这个问题了 我尝试修复一下 比较感兴趣

@15531400827
Copy link
Author

@YYL1999 期待解决

@YYL1999
Copy link

YYL1999 commented Jun 9, 2020

我看了下哈 使用分组柱状图 就得设置adjust 不然不知道要渲染分组柱状图还是堆叠柱状图 当不设置时渲染在了一起 就出现这个问题了

@15531400827
Copy link
Author

以前v3中也是这样实现的,没什么问题,v4不行了

@YYL1999
Copy link

YYL1999 commented Jun 9, 2020

要想实现分组柱状图就得设置adjust 不过不设置确实有个bug 我先看看

@YYL1999
Copy link

YYL1999 commented Jun 9, 2020

找到问题原因了 现在每次action-active操作会调用toFont和toBack函数 有个children队列 active时g里会将当前子元素拿出来然后塞到队列最后 调用onCanvasChange改变zIndex zIndex的值应该和队列中元素顺序有关 失去active时 则将该元素塞到队列首部 再改变zIndex 就会造成这个问题 我有空了改一下试试

@15531400827
Copy link
Author

谢谢大神
有空了也给看看这个问题呗, #2553
slider的问题之前有好几个人提了也没解决

@YYL1999 YYL1999 mentioned this issue Jun 10, 2020
14 tasks
@15531400827
Copy link
Author

@YYL1999 pr为什么提在antvis/g项目里面, 是不是提错地方了。。

@YYL1999
Copy link

YYL1999 commented Jun 15, 2020

@YYL1999 pr为什么提在antvis/g项目里面, 是不是提错地方了。。

没问题的 底层用的就是g g应该这个地方处理有点问题

@15531400827
Copy link
Author

@YYL1999 这个还是有问题啊, 我看你的PR没合。。。

@hustcc hustcc added the Legend label Jan 29, 2021
@hustcc
Copy link
Member

hustcc commented Aug 22, 2023

符合预期的,因为没有 dodge 或者 stack,所以柱子就是叠加在一起的,hover 时候,会把高亮的柱子放到上一层级,避免被遮挡。

@hustcc hustcc closed this as completed Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants