简体   繁体   English

JUNG中的重叠顶点标签

[英]Overlapping vertex labels in JUNG

First of all, I am new to JUNG. 首先,我是JUNG的新手。 I am trying to visualize trees in JUNG using the TreeLayout, but I am always faced with the issue of overlapping vertex labels. 我试图使用TreeLayout可视化JUNG中的树,但是我始终面临着重叠顶点标签的问题。 More so when the number of nodes and paths are many. 当节点和路径的数量很多时,情况更是如此。 Any ideas as to how to go about preventing such an overlap ? 关于如何防止这种重叠有任何想法吗?

I am aware of the vertex label renderer, but I did not get far with this either. 我知道顶点标签渲染器,但是我对此也不是很了解。

Here are a couple of options: 这里有几个选择:

(1) Increase distx (the distance between adjacent tree leaves). (1)增加distx(相邻树叶之间的距离)。 This is an optional constructor argument. 这是一个可选的构造函数参数。

(2) Use a Transformer for the rendered label that uses a substring of the label, or a shortened representation. (2)将Transformer用于使用标签的子字符串或简短表示形式的呈现标签。 Then separately set hover text to show the entire label. 然后分别设置悬停文本以显示整个标签。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM