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
legend 交互默认选中的问题 #2419
Labels
Comments
没有交互的时候 会偶尔会选中 偶现的情况 |
解决了吗?我好像也遇到了类似的问题。这个不是偶现,鼠标悬浮在某个legend上直接滑动鼠标就会复现 |
有复现的 demo 吗? |
移除图例某个交互就行,内置下面的交互,会导致 图例 item hover 时候,触发元素选中 // legend hover,element active
registerInteraction('legend-active', {
start: [{ trigger: 'legend-item:mouseenter', action: ['list-active:active', 'element-active:active'] }],
end: [{ trigger: 'legend-item:mouseleave', action: ['list-active:reset', 'element-active:reset'] }],
}); 可以通过下面的方式,在全局覆盖内置的交互行为,移除 图例 hover,激活元素 registerInteraction('legend-active', {
start: [{ trigger: 'legend-item:mouseenter', action: ['list-active:active'] }],
});
// 或者直接移除这个交互
chart.removerInteraction('legend-active') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
G2 Version: 4.0.7
Platform: pc
Mini Showcase(like screenshots):
CodePen Link:
The text was updated successfully, but these errors were encountered: