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

设置了limitInPlot:true,element中设置的label没有被隐藏 #3803

Closed
zailushang5011 opened this issue Feb 9, 2022 · 2 comments
Closed

Comments

@zailushang5011
Copy link

zailushang5011 commented Feb 9, 2022

y轴设置了最大值,并且设置了limitInPlot:true,element超出部分隐藏了,但是element中设置的label还会显示,期望label也被隐藏;
lALPJvuSydX1ZgPNAwrNBQg_1288_778

@hustcc
Copy link
Member

hustcc commented Feb 9, 2022

几个方案:

  1. 业务代码中去避开
  • label 显示到图形中间
  • 根据 label 回调决定是否显示 label
  1. G2 中处理
  • limitInPlot 对 label 也进行处理,但是会导致 label 显示一半,截断一半
  • 超出 limitInPlot 区域的 label 直接隐藏,需要梳理下是否会带来其他的问题

@connono
Copy link
Contributor

connono commented Feb 10, 2022

提供一下复现代码地址,我设置了limitInPlot:true和scale max,结果label是隐藏的

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