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

当文本换行时,采用 labelHeight 作为高度会导致文本碰撞 #3309

Closed
simaQ opened this issue Mar 2, 2021 · 3 comments
Closed
Assignees

Comments

@simaQ
Copy link
Contributor

simaQ commented Mar 2, 2021

const labelHeight: number = get(items[0], 'labelHeight', 14);

应该取整个 labelShape 包围盒的高度,同时考虑下可设置 label 与 label 之间的 margin,饼图其他布局也有类似的问题。

image

@visiky
Copy link
Member

visiky commented Mar 4, 2021

换行的时候 将labelHeight设置为更大,如 18*2=36
内部从性能考虑 暂不计算

@simaQ
Copy link
Contributor Author

simaQ commented Mar 4, 2021

换行的时候 将labelHeight设置为更大,如 18*2=36
内部从性能考虑 暂不计算

恩,临时方案我了解,不过想请教下,从性能考虑如果采用包围盒折损多少,性能的瓶颈点在这里吗?

@visiky
Copy link
Member

visiky commented Mar 4, 2021

也不算临时方案把,labelHeight 之前的定义就是整个 label 的高度。
大数据量遍历计算包围盒,会增加多少折损时间,暂时没去衡量,后面可以看时间处理下

@visiky visiky closed this as completed Oct 17, 2021
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

2 participants